Sometimes it is necessary to edit the file log4j.properties, but how can that be done?
The log4j.properties file is a text file, but it is stored on USS in ASCII. So, if you attempt to open it as EBCDIC, it may appear to be binary.
The ASCII requirement is due to JAVA (which only runs in ASCII). USS (OMVS) can run code that is ASCII as well as EBCDIC. OEDIT or ISHELL are for EBCDIC and cannot be used to edit ASCII files.
Here are three ways to edit this file in ASCII mode:
- Use one of the various utilities available to allow direct editing of ASCII files from USS. The IBM tool for example is AOEDIT, and there is an IBM redbook at: http://www.redbooks.ibm.com/redbooks/pdfs/sg247035.pdf which refers to a USSTools package (section 10.1.5) and that includes AOEDIT;
- Bring the file down to your PC via FTP in binary mode (so that the encoding is not changed during the transfer), editing it there using say Notepad or WordPad, then FTP it back (again in binary);
- Use an ISPF facility to edit ASCII within USS. From the ISPF main menu select 'UTILITIES - Perform utility functions'. From the Utility Selection Panel select 'Udlist' to see the z/OS UNIX Directory List Utility panel. On the z/OS UNIX Directory List Utility panel, fill in the Pathname then use normal USS commands to step down the path. Once down to the required directory, make yourself a superuser and enter the EA command on the appropriate file. Now you can see the file in a readable form and can update it.