Download Universal Command 3.2.0 User Guide

Transcript
Network Status Report
User Scripts
13.4 Network Status Report
The following script can be executed to determine the status of the network.
13.4.1 UNIX Example
Figure 13.7, below, illustrates a script that produces a report of the system status of a
remote UNIX system. Instead of executing a command on the remote host, a local script
file is executed.
Note that the commands executed in the script file may or may not require modifications,
depending on the type of UNIX system on which it executes.
echo "System Status as of `date`"
echo "--------------------------------------------------"
netstat
echo "--------------------------------------------------"
df
echo "--------------------------------------------------"
ps –ax
Figure 13.7 Network Status Report script - UNIX
JCL
Figure 13.8, below, illustrates how to execute the Figure 13.7 script from a z/OS
Universal Command manager.
//stepname EXEC UCMDPRC
//MYSCRIPT DD DISP=SHR,DSN=hlq.UNV.SCRIPTS(USCRP004)
//SYSIN DD *
-script myscript -host dallas -userid joe –pwd akkSdiq
Figure 13.8 JCL for Network Status Report Script - UNIX
The JCL procedure UCMDPRC is used to execute the command. The report is written to
the remote command’s standard out DD UNVOUT that is allocated to SYSOUT in the
UCMDPRC procedure. The command options execute the script allocated on DD
MYSCRIPT.
ucmd-user-3204
Confidential & Proprietary
250