Using z/OS UNIX commands
You can enter z/OS shell commands in the SHELLCMD dialog.
You can hyperlink to and access the SHELLCMD dialog:
- from the EZUSS menu
- from the EZUACTS menu
- by entering the SH command on the COMMAND line of any view
The following figure shows an example of the SHELLCMD - Run z/OS UNIX Commands dialog.
| COMMAND ===> SCROLL ===> CSR |
| |
| z/OS Unix Shell Command: |
| netstat________________________________________________________________ |
| _______________________________________________________________________ |
| _______________________________________________________________________ |
| _______________________________________________________________________ |
| |
| Run in background? N |
| |
| END to execute commands |
| CANcel to exit without executing |
| HELP to view related help |
| |
| |
+-----------------------------------------------------------------------------+
The following table describes the fields on the SHELLCMD - Run z/OS UNIX Command dialog.
Field name | Description |
---|---|
z/OS Unix Shell Command | Specify the shell commands, z/OS UNIX REXX EXECs, program binaries, and/or shell scripts to run, and any options or arguments to pass. Separate multiple commands with semicolons. The filepath of a non built-in command must be an absolute path specified as a prefix to the command name. The commands will run in the BMC AMI Ops Monitor for USS PAS, with the PAS user ID and UID=0, which allows you to run system management commands and issue the commands from MainView Explorer and TSO. Some commands do not work properly in a non-TSO environment, such as the ps command with no options, or oedit or obrowse, which need access to a 3270 terminal. (In the ISPF environment, you can use TSO OEDIT and TSO OBROWSE on the command prompt if your UAS is on the target system and you have read permission; they are ISPF commands that run in your TSO session and not the PAS.) Some commands might behave differently than when they are run in an interactive shell such as OMVS and under your own user ID. The shell command will time out if it runs for more than 20 seconds. In this case, you should run the command in the background. The current working directory is /, the root directory. The working directory can be changed temporarily with the shell command cd directory. The default PATH environment variable is PATH='/bin:/usr/sbin'. The PATH environment variable can be changed temporarily by using the shell command PATH=dirlist, for example, PATH='/bin:/usr/local:/usr/sbin'. |
Run in background? | Specifies whether to run command in background. Running the command in background is useful for a long running shell command. N runs the command in foreground and uses pipes to capture and display output. Y adds an ampersand to the end of the command and runs the command in a background subshell by using /bin/sh program. The background command output will be saved to the /var/bmc/ufo/ufocmd.log file if not redirected to another location. |
The output of the netstat command, showing active network connections, is shown in the following figure.
Line Output
---- ---------------------------------------
1 $ netstat
2 MVS TCP/IP NETSTAT CS V1R9 TCPIP Name: DC$TCPIP 18:43:59
3 User Id Conn Local Socket Foreign Socket State
4 ------- ---- ------------ -------------- -----
5 BBMICDCS 000007F2 172.19.164.166..54400 0.0.0.0..0 Listen
6 BBMICDCS 00000B20 172.19.164.166..54400 172.19.164.135..24749 Establsh
7 BBMICDCS 00000B18 172.19.164.166..1215 172.19.164.133..54400 Establsh
8 BBMICDCS 00000977 172.19.164.166..1207 172.19.164.134..54400 Establsh
9 BBMICDCS 000009C5 172.19.164.166..1214 172.19.164.130..54400 Establsh
10 BBMICDCS 00000A12 172.19.164.166..54400 172.19.164.130..4461 Establsh
11 BBMICDCS 00000B19 172.19.164.166..1216 172.19.164.129..54400 Establsh
12 BBMICDCS 00000814 172.19.164.166..54400 172.19.165.101..31339 Establsh
13 BBMICDCS 00000982 172.19.164.166..54400 172.19.164.134..18990 Establsh
14 BBMICDCS 00000802 172.19.164.166..1171 172.19.165.101..54400 Establsh
15 BBMICDCS 00000B2B 172.19.164.166..54400 172.19.164.133..29108 Establsh
16 BCVCB660 00014D72 0.0.0.0..24410 0.0.0.0..0 Listen
17 BCVCB660 00014D79 0.0.0.0..24660 0.0.0.0..0 Listen
18 BCVCB660 00014D75 0.0.0.0..24414 0.0.0.0..0 Listen