MVS console invocation of the EZACMD command

To use the EZACMD command from the MVS™ console, you must meet the following requirements:
  • Verify that EZACMD was installed in the SYS1.SAXREXEC System REXX system library.
  • The System REXX component must be configured and enabled on the z/OS® image. See the System REXX information in z/OS MVS Programming: Authorized Assembler Services Guide and the AXR00 (default System REXX data set concatenation) information in z/OS MVS Initialization and Tuning Reference for details about enabling System REXX on your z/OS image.
  • An operator must be logged on to the console (using the LOGON console command).
  • The operator user ID must have a valid OMVS segment in the security database.

Guideline: The output from the command might not be formatted correctly as a result of the line width restriction for the MVS console. For the best formatting results, invoke the command from TSO, NetView®, or the UNIX shell.

Rule: You must enclose the command and options in single quotation marks (') so that the MVS console support does not convert the command name and options to uppercase characters.

Format:

Read syntax diagramSkip visual syntax diagram
                                                       .-MAX=100---.      
>>-prefix--EZACMD--'command name--+-----------------+--+-----------+--'-><
                                  '-command options-'  '-MAX=lines-'      

Parameters

prefix
The System REXX command prefix as defined in the AXRnn parmlib member. For example, if the prefix is defined as %% then invoke the command as %%EZACMD.
command name and options
The command name is one of the supported z/OS Communications Server UNIX shell commands.

Command options are any options that the UNIX shell command supports. You must enter the command options in the exact format and case that is required by the z/OS UNIX command.

MAX= lines
MAX is an optional keyword that limits the number of output lines that are produced by the z/OS UNIX command and that are displayed on the MVS console. The default value is 100. The value can be any numeric value in the range 1 - 64 000.

Example 1

Display currently active IPSec filters, limiting the number of output lines to 9.

%%EZACMD 'ipsec -f display max=9'                                        
System REXX EZACMD: ipsec command - start - userID=USER1                  
System REXX EZACMD: ipsec -f display                                      
CS V2R1 ipsec  Stack Name: TCPCS  Fri Oct  7 14:07:07 2011               
Primary:  Filter          Function: Display            Format:   Detail   
Source:   Stack Policy    Scope:    Current            TotAvail: 730      
Logging:  On              Predecap: Off                DVIPSec:  No       
NatKeepAlive:  0                                                          
Defensive Mode: Inactive                                                  
                                                                          
FilterName:                   DVIPA1 2                                    
FilterNameExtension:          1                                           
System REXX EZACMD: Maximum number of output lines (9) has been reached.
System REXX EZACMD: ipsec command - end - RC=4                            

Example 2

Ping host w3.ibm.com:

%%EZACMD 'ping -v w3.ibm.com'                                           
System REXX EZACMD: ping command - start - userID=USER1                 
System REXX EZACMD: ping -v w3.ibm.com                                  
CS V2R1: Pinging host w3.ibm.com (9.17.137.11)                         
with 256 bytes of ICMP data                                             
Ping #1 from 9.17.137.11: bytes=264 seq=1 ttl=242 time=62.48 ms         
Ping #2 from 9.17.137.11: bytes=264 seq=2 ttl=242 time=61.98 ms         
Ping #3 from 9.17.137.11: bytes=264 seq=3 ttl=242 time=86.88 ms         
Ping statistics for w3.ibm.com (9.17.137.11)                            
  Packets: Sent=3, Received=3, Lost=0 (0% loss)                         
  Approximate round trip times in milliseconds:                         
  Minimum=61.98 ms, Maximum=86.88 ms, Average=70.45 ms, StdDev=14.23 ms 
System REXX EZACMD: ping command - end - RC=0