Prepend
2005-10-10
  Viewing ASCII files on zOS
So, through an altogether comical chain of events, I am my project's "z/OS WebSphere guy" sort of. So I frequently spend time working on our apps on z/OS and/or WebSphere (we've also got some instances on other OSes). The cool news is that I got to go to WebSphere training in Denver, the downside is that I have to work with WebSphere on z/OS.

One of the most interesting things that you come upon with WebSphere is that it runs Java in ASCII mode, reading and writing out files in ASCII. z/OS stores its files in EBCDIC. So this basically means that if you are telnetting into USS, you can't really view or edit files. If you try to view an ASCII file through USS using vi, you get something like this:

^T^Z^78_%^20^76^65^72^73^69?>^U^22^31^F^30^22^20
^69?>^U^22^V^F^30^22^20^78_%>^73^3A^78_^69^U^22
?>^U^22^V^F^30^22^20^78_%>^72^3A^78_^69^U^22^68

Not too useful. So, a fellow developer who has since left the company found out how to use iconv pretty well and added to a bunch of our ant scripts. I made some shell scripts that basically run:
iconv -f ISO8859-1 -t IBM-1047 file.name | more 

so I can actually view the file and it shows up properly. Of course this sucks because I haven't figured out how to tail a file live, but it's better than ftping the files down to windows in binary mode.

Other than that, WebSphere is pretty normal. The different I've seen between z/OS and Unix/Windows is that the z/OS WAS has a control jvm process that launches and controls 1 or more servant jvm processes. Unix/Windows just has a single jvm process that does all the work.

Also, I just upgradeds my IntelliJ 3 to version 5 and now it spends a few minutes a day indexing my project files. This is a little annoying. I guess with version 3, it would index while it was minimized/backgrounded. But now, with version 5, it waits until I switch to it to start indexing. Oh well, I guess those smart Russians will fix this soon.
 
Comments:
Brian,

We use Log4j Enhancements for J2EE Applications under WebSphere Application Server v6 for z/OS -- http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/TD102335.

This log4j extension outputs your log data in EBCDIC (IBM-1047)...allowing you to tail your WAS logs from a ssh session.

I feel your pain though...for the longest time I also had to FTP my logs (in binary mode) to my Windows machine before I could examine!
 
Post a Comment



<< Home
Technical and personal notes from Brian Lee, technologist/enterprise architect/software developer/soa guy.

ARCHIVES
February 2005 / March 2005 / April 2005 / May 2005 / June 2005 / July 2005 / August 2005 / September 2005 / October 2005 / November 2005 / December 2005 / January 2006 / February 2006 / March 2006 / April 2006 / May 2006 / June 2006 / August 2006 / September 2006 / October 2006 / November 2006 / December 2006 / January 2007 / May 2007 / June 2007 / August 2007 / September 2007 / October 2007 / April 2008 / July 2008 / January 2009 / May 2009 / June 2009 /
My Photo
Name: Brian Lee
Location: Atlanta, Georgia, United States

 
Web prepend.com






Powered by Blogger