CMD (Issue IMS command without response)


Related topic


Command

Parameters

CMD

/IMS command


The response segment is returned in the standard CLIST variable SYSDVAL, which can be parsed by using the READDVAL command. READDVAL functions the same way as in a TSO CLIST.

Important

Command response is not returned when the /MODIFY or /MSVERIFY command is issued.


Parameters

Function

Notes

/IMS command

IMS command to be issued

For information about specifying IMS generic commands or using wildcard characters, see How IMS generic commands are processed.

For an example of issuing generic commands with IMS generic parameter support, see Issuing IMS generic commands with IMS generic parameter support.

Condition codes are listed in the following table:


Value

Description

0

Command was issued and first segment of response returned in SYSDVAL.

4

Generic command format resulted in multiple IMS commands. SYSDVAL contains response to first command.

8

Command timed out; no response returned (Msg IM9215W issued).

12

One of the following situations occurred:

  • Target IMS was not available.
  • The message IO1317W Command Not Issued, No Matching Resource Found is returned as a response when there are no matching resources found.

How IMS generic commands are processed

When you use the IMFEXEC statement to issue generic IMS commands, by default command processing is performed within the BMC AMI Ops Automation address space. This topic describes how BMC AMI OpsA processes wildcards when they are used with generic IMS commands.

When BMC AMI OpsA processes the commands, you can use wildcard characters in generic IMS resource names. The plus sign (+) or the percent sign (%) represents a single character and the asterisk (*) represents more than one character.

If you need to specify more than one generic IMS resource name with an IMS command, you must specify the K( ) keyword at the end of the command. The K( ) keyword must contain the keyword or keywords to be issued with the IMS command, one or more blank spaces, or a null if no keywords exist. Do not specify the K( ) keyword with IMS commands that do not include at least one generic name.

Following are some examples for using the K( ) keyword:

/STA DB BBFMDB4+ CS* CUSTHI+M K(ACCESS=UP)
/STA DB CUST* K(ACCESS=UP DBALLOC)
/STA DB BBFMDB4+ CUSTHI+M K()

You can have IMS process the commands instead of BMC AMI OpsA by specifying the at sign (@) after the forward slash (/) and before the IMS command.

When you specify the K( ) keyword, and the following conditions also exist, the IMS command parameters specified within the K( ) keyword are attached to the end of each resolved IMS resource name when checking SAF authorization:

  • BBPARM member BBSEC includes the FEATURE value, which includes CMD
  • IMS=4 (or higher)
  • IMSGEN

IMFEXEC /@IMS command

When you specify the IMS command using this format, the IMS command is passed to IMS where generic parameter substitution takes place. To switch back to BMC AMI OpsA generic command processing, remove the @ sign from the IMFEXEC CMD statement.

Note

Not all IMS commands and keywords support IMS generic parameters. You should ensure that generic parameters are supported for IMS to process any commands.

For more information about using wildcard characters in IMS commands and which commands and keywords are supported, see the section "Generic Parameters" in the IBM documentation IMS Command Reference.

If you attempt to specify an IMS generic command or keyword that is not supported by IMS, the following message is issued:

DFS3630 10:26:33 GENERIC PARAMETER IS NOT ALLOWED

Issuing generic commands

In this example, BMC AMI OpsA issues generic /STA DATABASE commands to start all databases whose names begin with BE3 or contain the characters ORDER in positions 4-8.

The * cannot be followed by any other characters and only one can be used in a string. You can use a + and an * together in a generic IMS resource command but the * must be the last character.

/* REXX */
"IMFEXEC CMD /STA DATABASE BE3ORDER"
"IMFEXEC CMD /STA DATABASE BE3*"
"IMFEXEC CMD /STA DATABASE +++ORDER"
"IMFEXEC CMD /STA DATABASE BE+ORDER"
"IMFEXEC CMD /STA DB BBFMDB4+ CUSTHIDM K(ACCESS=UP)"
"IMFEXEC CMD /STA DB BBFMDB4+ CUSTHI+M K() "

CLIST example:

IMFEXEC CMD /STA DATABASE BE3ORDER
IMFEXEC CMD /STA DATABASE BE3*
IMFEXEC CMD /STA DATABASE +++ORDER
IMFEXEC CMD /STA DATABASE BE+ORDER
IMFEXEC CMD /STA DB BBFMDB4+ CUSTHIDM K(ACCESS=UP)
IMFEXEC CMD /STA DB BBFMDB4+ CUSTHI+M K()

Retrieving &SYSDVAL

This example starts an IMS transaction and verifies that the start command worked. This method of issuing an IMS command (no quotation marks) returns only the first response segment to the EXEC. Additional response segments are not available to the EXEC.

See the description of IMS command with response in the next section for information about accessing all response segments in an EXEC.

/* REXX */
"IMFEXEC CMD /STA TRAN TE4COCNG"
/* SYSDVAL = DFS058 COMMAND COMPLETED EXCEPT FOR TE4COCNG */
READDVAL MSGID P1 P2 P3 P4 P5
IF P3 = 'EXCEPT' THEN DO
  commands
END

CLIST example:

IMFEXEC CMD /STA TRAN TE4COCNG
/* SYSDVAL = DFS058 COMMAND COMPLETED EXCEPT FOR TE4COCNG */
READDVAL MSGID P1 P2 P3 P4 P5
IF &P3  EQ EXCEPT THEN DO
  commands
END

Issuing IMS generic commands with IMS generic parameter support

In this example,  BMC AMI OpsA issues the generic command /DIS TRAN and uses IMS generic parameter processing to display all APPC dynamic transactions starting with IDCF.

Note that the at (@) sign is specified after the slash (/) sign, which means IMS will perform the command processing.

/* REXX */
"IMFEXEC CMD /@DIS TRAN IDCF*"
"IMFEXEC CMD /@DIS TRAN IDCF%%%%"

 

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