![]() | ![]() | ![]() |
Many of the SAS® configuration files that are stored in the SASHOME directory on z/OS are in ASCII. It can be cumbersome to switch from ISPF option 3.17 to BA (Browse ASCII) or EA (Edit ASCII) on these files and then switch back to the OMVS shell to launch commands. This SAS Note offers an alternative to enable BA and EA functionality within the native OMVS shell.
Note: Ensure that your presentation space area is sufficient to fit all of the text when you paste as instructed below. In particular, if you use an emulator module with an 80-character width, the characters "$HOME/temp.conv" on the second iconv command are truncated. You can use the right command or the PF11 key to shift the screen right a few columns and enter the remainder of the line.
From the native OMVS shell (note that you must have started OMVS from the ISHELL, not from option 6, to use the oedit command):
#!/bin/sh cnvto="$(locale codeset)" # export cnvto echo Session running with codeset $cnvto echo This will be used to view the ASCII file $1 iconv -f ISO8859-1 -t $cnvto $1 > $HOME/temp.conv | obrowse $HOME/temp.conv rm $HOME/temp.conv
Note: Do not change the obrowse command to oedit to create the EA shell script. This would cause the file permissions to be changed when saved. The following script lets you edit without changing the file permissions.
#!/bin/sh cnvto="$(locale codeset)" # Copy to temp.conv to maintain permissions #cp $1 $HOME/temp.conv # Make backup of original ASCII file which needs editing cp $1 $1.prev echo Session running with codeset $cnvto echo This will be used to EDIT the ASCII file $1 # Convert from ASCII to session codeset then edit the file iconv -f ISO8859-1 -t $cnvto $1 > $HOME/temp.conv | oedit $HOME/temp.conv iconv -f $cnvto -t ISO8859-1 $HOME/temp.conv > $1 rm $HOME/temp.conv
$ ls -l total 32 -rwxr-xr-x 1 userid TSD 236 Jun 8 2012 ba -rwxr-xr-x 1 userid TSD 466 Jun 8 2012 ea $This example shows that the owner (user ID) can read, write, and execute these files, and anyone else can read and execute them. You need permissions of rwx for Owner (you) and (optional) r-x for Group and Other. To set permissions so that anyone can execute these scripts, use the following commands:
chmod 755 ea chmod 755 ba
To add the bin directory to your OMVS session profile, do the following:
The path is not yet defined under this current OMVS shell session because .profile is invoked only when you first open the OMVS shell. To instantiate without exiting and re-entering the shell, execute the .profile file.
You now have the ability to BA (Browse ASCII) and EA (Edit ASCII) any ASCII file stored under your OMVS environment.
| Product Family | Product | System | SAS Release | |
| Reported | Fixed* | |||
| SAS System | Base SAS | z/OS | ||
| Type: | Usage Note |
| Priority: |
| Date Modified: | 2013-01-02 13:46:29 |
| Date Created: | 2012-05-09 12:18:12 |


