You are here :: Home :: Documentation :: JZOS :: Editing ASCII Files under z/OS
Editing ASCII files under z/OS
XML and Java properties files are normally stored in the HFS (Unix) filesystem in codepage ISO8859-1 (ASCII). This document provides some assistance for how to edit these files on z/OS or OS/390. Here are several approaches for editing ASCII files under Z/OS:- Convert the file from ASCII to EBCDIC before editing and back again when done. For
example:
iconv -f ISO8859-1 -t IBM-1047 myfile.properties > myfile.properties.a
vi myfile.properties.a (or oedit if under a 3270 OMVS shell)
iconv -f IBM-1047 -t ISO8859-1 myfile.properties.a > myfile.propertiesThe "atools" scripts which we have updated, available from the downloads page, provides small shell scripts that automate this process
- Tag the file as ASCII text and then enable automatic conversion.
chtag -tc ISO8859-1 myfile.properties (A file only needs to be tagged once.)
export _BPXK_AUTOCVT=ON (this environment variable enables automatic conversion)
vi myfile.propertiesNote: Be careful, however, to not set _BPXK_AUTOCVT=ON in your actual JVM process, as Java will not expect automatic conversion of properties and XML files. For more information, see z/OS enhanced ASCII Functionality
- The free jEdit editor has an FTP plugin that allows you to edit files over an FTP
connection.
The FTP plugin always downloads files in binary, and the editor by default assumes that you are editing in codepage ISO8859-1, so editing ASCII files is quite simple once it is setup.If you run this editor under Java 1.4.2, you can specify codepage "Cp1047" (EBCDIC) to edit EBCDIC HFS files. For more information on jEdit: http://www.jedit.org/
- Edit the file in an IDE, such as Eclipse, and then deploy it to z/OS using an Ant script
by using the Ant FTP task.
See the sample Eclipse projects on the downloads page for more information.