These tools build a collection of useful functions and extensions for the current UNIX System Services environment. Support is included for for the OMVS shell in systems running with German or US Host Emulation Code pages. Editing of UNIX files is supported for all emulation code pages supported by iconv (conversion to and from IBM-1047). To get detailed information how to install the package click on Installation.
Robert HeringE-Mail: Robert.Hering@de.ibm.com
Table of Contents
|Introduction||Introduction and comments to the tools contained in this package|
|AOBROWSE||OBROWSE USS files available in ASCII converted to a specified code page if conversion is supported by ICONV|
|AOEDIT||OEDIT USS files available in ASCII converted to a specified code page if conversion is supported by ICONV>|
|GO||Get back to the ISPF/TSO session(s) while OMVS shell session(s) are kept active|
|GOBROWSE||OBROWSE USS files converted to the German code page|
|GOEDIT||OEDIT USS files converted to the German code page|
|OMVS||Run OMVS with a specified OMVS conversion table|
|PSINFO||Get information about active processes|
|REXX||Run a REXX command processor to process SYSCALL, Shell, TSO and REXX commands|
|RXSHELL||Run UNIX commands interactively from TSO foreground or in TSO batch jobs|
|RXSUSH||Switch to SU mode if possible and run UNIX commands in TSO foreground and TSO batch jobs|
|SAOEDIT||OEDIT USS files available in ASCII converted to a specified code page if conversion is supported by ICONV in SU mode|
|SGOEDIT||OEDIT USS files converted to the German code page in SU mode|
|SOEDIT||OEDIT USS files in SU mode|
|SU||Run commands in ISPF/TSO foreground or TSO batch in SU mode|
|SUOEDIT||OEDIT USS files converted to the US code page in SU mode|
|"SU -"Support||Support full shell initialization for the Standard and the C Shell environment when switching to another userid using the "su" command|
|SWSU||Switch to SU mode (temporary) or just run one command with superuser authority in a USS shell environment|
|SXOEDIT||OEDIT USS files converted to a specified code page supported by ICONV in SU mode>|
|UOBROWSE||OBROWSE USS files converted to the US code page|
|UOEDIT||OEDIT USS files converted to the US code page|
|XOBROWSE||OBROWSE USS files converted to a specified code page supported by ICONV|
|XOEDIT||OEDIT USS files converted to a specified code page supported by ICONV|
|HintsTips||Additional Hints and Tips how to use these USS tools|
|Installation||Detailed information how to install the package|
This package includes several z/OS UNIX tools which are especially useful in the following situations:
It was made available from the z/OS UNIX tools page in June 2001 for the first time. In the meantime several updates were needed to incorporate changes made within interface routines in z/OS V1.3 (when editing UNIX files). These modifications have been done in this new version. Furthermore, some new functions have been added.
All the BROWSE and EDIT tools in this package which handle code page conversion from and to the standard z/OS UNIX code page are using a temporary file in the /tmp/ directory with all " /"-characters replaced by " \" in order to provide the impression that the user is working with the original file. Please note, that it is necessary to end an edit session in order to activate the modifications in the original file.
In this description the term z/OS is a synonym for both, OS/390 and z/OS. If you see BPX.SUPERUSER this means a superuser or a user with READ access to FACILITY profile BPX.SUPERUSER. SU mode serves as a short form for superuser mode, i.e. running with real and/or effective UNIX UID value set to 0. The term IBM-1047 USS file is a short form for a UNIX file with a contents composed in the standard z/OS UNIX code page IBM-1047, often simply referenced as "C".
Before providing a description of the tools it is the right place to say thank you to all the customers and IBM colleagues which tested specific tools, sent suggestions for changes or enhancements. Especially I want to thank Britta Kuehn for her help in putting together the German conversion table and Hans-Dieter Mertiens for testing it and distributing it to many customer locations and also for his suggestions regarding the "su -" support.
You may use SAOEDIT to run AOEDIT in SU mode.
in an OMVS shell to get (back) to your ISPF/TSO environment and all active ISPF sessions while the OMVS shell session(s) are kept. Press PF3 on the ISPF session marked with an application id of OMVS to return to the UNIX shell session(s).
tso %omvs g
If you are using IBM-273 or IBM-1141, use
tso %omvs u
if your terminal emulation is IBM-037. To get a more detailed information how to specify parameters just enter
tso %omvs ?
Regarding the German terminal emulation this functionality is based on the conversion table file within UNIX.LINKLIB. If you want to use a USS conversion table by default have a look to Using specific USS conversion tables by default in Hints and Tips. The information given will provide the means how to use the standard OMVS command again instead of the REXX procedure!
is supported in ISPF/TSO ( tso rexx) and USS shell environments ( rexx) and allows to run TSO, SYSCALL, USS Shell and REXX commands interactively. Just have a look to the following samples (which may be run by a BPX.SUPERUSER) and try yourself.
"One-line" command samples in ISPF/TSO:
(*1) tso rexx s geteuid (*2) tso rexx s seteuid 0 (*3) tso rexx s seteuid xxx (*4) tso rexx s setuid 0
( *1) - Displays the effective UID shown as the "OMVS Return value"
Using the tool as an "Interactive REXX command processor" in a USS shell environment:
id rexx sh "id" s setuid 0 sh "id" exit id
Following some sample commands entered from TSO:
tso rxshell Enter command input data or "exit" to exit processing: pwd pwd /u/hering id -u+ 888 Enter command input data or "exit" to exit processing: exit
Following some “one-line” commands from TSO:
tso rxsush id UID setting switched to 0... id -u 0 tso rxsush pwd UID setting switched to 0... pwd /
su oput usstools(etcsetup) '/etc/.setup' su rexx s chmod /etc/.setup 755
"su -" Support
su - newuser su - -s newuser
swsu chmod 755 /etc/.setup swsu ps -e | grep cron
Using specific USS conversion tables by default
This will provide the following advantages:
You can make use of this "default" support for the US terminal emulation as well as you have the REXX procedure available for all the other situations again. BPXFX000 is defined as an alias of BPXFX111 (the US code page conversion table) in SYS1.LINKLIB already. The only thing needed is to define FSUMQ000 as an alias of BPXFX111, too. By default FSUMQ000 points to the null character conversion table BPXFX100.
Running USS commands from TSO Batch
//UNIXJOBJOB,'USSCommands',NOTIFY=&SYSUID.,REGION=0M //* ---------------------------------------- //* Run USS shell commands in TSO batch mode //* Property of IBM (C) Copyright IBM Corp. 2002-2003 //* ---------------------------------------- //SET TIMEOUT=R0 <=== Timeout value in seconds, <R>0=no timeout //SET RXSHCMD=RXSHELL <=== RXSHELL or RXSUSH //SET REXXLIB=UNIX.REXX.EXEC <=== SYSEXEC library //*---------------------------------------- //OMVSEXECPGM=IKJEFT01,PARM= '&RXSHCMD.&TIMEOUT.' //SYSEXECDDDSNAME=&REXXLIB.,DISP=SHR //STDENV DD DATA,DLM=## # ----------------------------------------- TSOALLOC=sysexec sysexec='UNIX.REXX.EXEC' PATH=/u/bin:/bin tmpfile=/tmp/my.testfile # ----------------------------------------- ## //STDIN DD DATA,DLM= ## # ----------------------------------------- id swsu id chmod chmod 2> /dev/fd1 ! iconv -f IBM-1047 -t IBM-273 touch $tmpfile && chmod 644 $tmpfile && ls -E $tmpfile - && rm $tmpfile && ls -E$tmpfile;+ #------------------------------------------ ##//SYSTSINDDDUMMY//SYSTSPRTDDSYSOUT=*,LRECL=136,RECFM=V //* ----------------------------------------
tso su gobrowse /etc/rc
ftp my.zos.system myuser mypasswd binary quote site blk=3120 lrecl=80 recfm=fb put usstools.unload.bin usstools.unload
Afterwards run the following command on your z/OS system:
Installing the Tools
If you change the name of the UNIX.LINKLIB you need to correct the conv_parm or conv_ger statement value "'UNIX.LINKLIB(BPXFX273)'" in the following REXX procedures accordingly:
Furthermore, you should edit and adopt the following settings in REXX procedure GOEDIT
backslash = "?" /* Back slash */ . xoedit_ux_codepg = "IBM-1047" /* Use iconv for */ xoedit_ed_codepg = "IBM-273" /* IBM-273 <-> IBM-1047 */ aoedit_ux_codepg = "ISO8859-1" /* Use iconv for ISO */ aoedit_ed_codepg = "IBM-273" /* ASCII <-> IBM-273 */
Replace the " ?" by the character that represents the back slash in your local code page used and also change “ IBM-273” accordingly. You may also change settings later on when the files are copied to into the target REXX Library. But then you need to modify all the following files, depending on what is needed when they are used: GOBROWSE, GOEDIT, OMVS, XOBROWSE, XOEDIT, UOBROWSE, UOEDIT, AOBROWSE, AOEDIT. If you use the US and a local terminal emulation in parallel it may be useful to replace the back slash character in UOBROWSE and UOEDIT after installation, of course. Finally a last example; if you decide to use XOBROWSE and XOEDIT with the US emulation replace IBM-273 by IBM-037.Customizing the "su -" Support
To use the functionality of the "su -" support there are some more customization steps which need to be performed.
Please note, that this /etc/.setup file also controls the prompt setting displayed in a USS shell environment. If you do not like it remove the lines dealing with the prompt setting.Assemble and Link-edit the German Conversion Table File
If you should ever need to assemble and link-edit the German conversion table file BPXFX273 again use the following LINK parameters and INCLUDE statements:
...//PARM='LIST,REUS,RENT,NCAL,LET,MAP,AMODE=31,RMODE=ANY,AC=0' ... //SYSLIN DD DATA,DLM=## INCLUDE BPXFX273 ENTRY BPXFX273 ALIAS BPXFX000 ALIAS FSUMQ000 NAME BPXFX273(R) ##