CMD (Issue VM command with response)


This command issues a VM command.

A response is returned to the issuing EXEC.

This command is supported only from REXX EXECs.

Command

Parameters

CMD

TYPE(VM)

`command'

[MAXLINES ()]

TARGET(system_name)

[SERVER(server_name)]

[STEM(stem)]

[DEBUG]

The following table describes the parameters:

Parameter

Function

Notes

TYPE

specifies the type of command

Specify VM to issue VM commands.

This keyword is required.

command

specify the command to be issued in the VM that is specified with the TARGET keyword

Possible commands include CP and CMS commands. You can also submit jobs to CMSBATCH.

Maximum length is 256 characters.

Prefix each command as follows:

  • CP is a valid CP command
  • CMS is a valid CMS command
  • CMSBATCH parm1 parm2 parm3 parm4 parm5 parm6 parm7 where:
    • parm1 is a machine name(default values is CMSBATCH)
    • parm2 is an account number (default value is 99999999)
    • parm3 is a job name (default valies BATCHJOB)
    • parm4 is a time limit in seconds (default values is CMSBATCH default value)
    • parm5 is the maximum number of lines printed (default values is CMSBATCH default value)
    • parm6 is the maximum number of punch cards (default values is CMSBATCH default value)
    • parm7 is the command text
    • You must specify valid command text that can include blanks; for example: LISTFILE V* E*

Note

For parm1 through parm6, specify an asterisk (*) to use the default value of the parameter.

MAXLINES

specify the maximum number of lines that will be returned from VM

The default is a maximum of 500 lines.

This parameter is not associated with a TIMEOUT keyword. In other words, you will receive at the most, the number specified here but if fewer lines are returned, you will receive that number of lines.

TARGET

specify the name of the VM system where the command is to be issued

You can issue a command to any VM system that is identified to the CAS.

1- to 8-characters alphanumeric

This keyword is required.

SERVER

can be used in target mode to distinguish between different products that contain the same target name

Specify a value that is 1- to 8-characters alphanumeric characters

The default is all servers.

This keyword is optional.

STEM

returns command responses in REXX stem TSO variables where the value of stem.0 resolves to the number of lines returned

(optional) Specify a stem root name for the REXX stem variable.

  • The maximum length of the value that you can specify is 8 characters
  • The value must conform to standard REXX variable naming rules
  • Compound REXX stem variables are not supported

If the stem name that is provided ends in a period (.), MainView AutoOPERATOR processing ignores the period. For example, specifying STEM(MYVAR.) produces the same result as specifying STEM(MYVAR).

Using this parameter overrides the creation of LINEn variables in the LOCAL variable pool. The REXX stem variable is only defined as a TSO variable. If you want to use the variables as LOCAL variables, you must first use IMFEXEC VPUT to move these variables to the LOCAL pool.

These REXX stem variables conform to all TSO/E REXX coding standards for stem variables.

DEBUG

issues messages that can be used for debugging problems

This keyword is used during problem diagnosis.

Condition codes are listed in the following table:

Value

Description

0

Command successfully issued. Response returned.

8

Invalid parameter specified.

32

MV CONNECT command error occurred. See error message EM7123E for diagnostic information about the error. Additional error messages are in REXX stem variable LINE.#. IMFRC contains the return code. MVAPICMP contains API completion code and MVAPIRSN contains the API reason code. Refer to IMFEXEC-MV-CONNECT for more information.

36

MV CONTEXT command error occurred. See error message EM7123E for diagnostic information about the error. Additional error messages are in REXX stem variable LINE.#. IMFRC contains the return code. MVAPICMP contains API completion code and MVAPIRSN contains the API reason code. Refer to IMFEXEC-MV-CONTEXT for more information.

40

MV VIEW command error occurred. See error message EM7123E for diagnostic information about the error. Additional error messages are in REXX stem variable LINE.#. IMFRC contains the return code. MVAPICMP contains API completion code and MVAPIRSN contains the API reason code. Refer toIMFEXEC-MV-VIEW for more information.

44

MV GETDATAN command error occurred. See error message EM7123E for diagnostic information about the error. Additional error messages are in REXX stem variable LINE.#. IMFRC contains the return code. MVAPICMP contains API completion code and MVAPIRSN contains the API reason code. MV-GETDATAN for more information.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*