Previous Topic: Documentation ChangesNext Topic: How You Abbreviate and Truncate Statements and Commands


Specifying Statements and Issuing Commands

This section contains the following topics:

Statement Considerations

Command Considerations

How You Abbreviate and Truncate Statements and Commands

Positional Parameters

Statement and Command Syntax

Notation Used for Components

Statement Considerations

Keep in mind the following when you add statements to your parameter files:

Command Considerations

Keep in mind the following when issuing commands:

How Commands Are Executed (VM)

CA MIM commands, such as ATTACH and DISPLAY, are sent to the service virtual machine by the user who is requesting services. CA MIM processes the commands, and then notifies the user of the results.

We recommend using the MI module to manage communications between CMS applications and CA MIM. You invoke the MI module by placing the prefix MI before CA MIM commands and issuing them from the keyboard or from within an EXEC procedure.

MI can also be invoked from a user-written assembly program through the SVC 202 interface (MI runs in the transient area). When commands are invoked in this way, MI forwards the command to CA MIM using an IUCV connection and waits for response text and a return code to be received from CA MIM over the same connection.

Using the MI module allows users to wait for completion of CA MIM commands. This capability is important when the commands are used from within an EXEC.

By default, the MI module directs command responses to the console of the user who issues the command, but the REXX or STACK option can be used to redirect command responses to REXX variables or to the console stack. The following REXX programs illustrate the use of the REXX and STACK options:

/* Test REXX option */
'MI D SYS ( REXX'
IF rc /= 0 THEN EXIT rc
DO I = 1 TO mimgr.0
  SAY mimgr.i
END
EXIT 0
/* Test STACK option */
'MI D SYS ( STACK'
rcx = rc
waiting = QUEUED()
DO I = 1 TO waiting
  PARSE PULL xx
  SAY xx
END
EXIT rcx

You can also send commands to the service virtual machine by using the CP SMSG command, as in the SMSG MIMGR DISPLAY SYS command. When SMSG is used, the return code indicates only the success or failure of the CP SMSG command. Progress and completion messages from CA MIM are then sent to the issuer of the command through MSGNOH, and they arrive asynchronously with respect to other user activities.

Note: CA MIM produces a return code of 0 for all successful commands. A command that causes a queued action produces a return code of 1, even if the action subsequently fails. Commands that fail for other reasons generally return another non-zero return code. Non-zero return codes are explained in the CA MIM Resource Sharing for z/OS and z/VM Message and Code Reference Guide.