These examples show specific usage of the ADDRESS OPER for each type of command response.
A majority of command responses are in the form of single line MLWTOs as illustrated with the following D NET,ID command. For a single MLWTO command response, the most effective keywords are CMDWAIT(xx), and INTERVAL(0).
Single MLWTO-generated command response output as extracted from the OPSLOG:
OPSLOG Browse OPS11Q - CA11 --- OPSVIEW --- 07:17:12 OPSF CnslName ----+----1----+----2----+----3----+----4- 8000 OPS11X01 D NET,ID=A11IOPS,E 2408 OPS11X01 IST075I NAME = A11IOPS, TYPE = APPL SEGMENT 2408 OPS11X01 IST486I STATUS= ACTIV, DESIRED STATE= ACTIV 2408 OPS11X01 IST360I APPLICATIONS: 2408 OPS11X01 IST080I A11IOPSA CONCT A11IOPSB CONCT 2408 OPS11X01 IST080I A11IOPSD CONCT A11IOPSE CONCT 2408 OPS11X01 IST080I A11IOPSG CONCT A11IOPSH CONCT 2408 OPS11X01 IST080I A11IOPSJ CONCT A11IOPSK CONCT 2408 OPS11X01 IST080I A11IOPSM CONCT A11IOPSN ACT/S 2408 OPS11X01 IST080I A11IOPSP ACT/S A11IOPSQ ACT/S 2408 OPS11X01 IST080I A11IOPSS CONCT A11IOPST ACT/S 2408 OPS11X01 IST080I A11IOPSW ACT/S A11IOPSX CONCT 2408 OPS11X01 IST080I A11IOPSZ CONCT A11IOPSV ACT/S 2608 OPS11X01 IST314I END
Using this VTAM display command as an example, the following code illustrates issuing a command and collecting output that is returned as a SINGLE MLWTO (Primary line, followed by data lines, with one end line for end of response) back to the issuing CA OPS/MVS console.
/*--------------------------------------------------------*/ /* Start out with a clean EDQ before issuing the command. */ /*--------------------------------------------------------*/ clearedq = OPSCLEDQ() /*--------------------------------------------------------*/ /* Issue the VTAM display command using the necessary */ /* command response trapping keywords. /*--------------------------------------------------------*/ ADDRESS OPER "Command(D NET,ID=A11IOPS,E) Cmdwait(30) Interval(0)" /*--------------------------------------------------------*/ /*Simply display back the captured command responses. The */ /*collected command responses are destined for the */ /*External Data queue of the program and can be extracted */ /*via the PULL instruction. */ /*--------------------------------------------------------*/ cmdoutlines = QUEUED() do cmdoutlines pull cmdoutput say '**>OUTPUT='cmdoutput end
The following keywords are used within the above sample:
Specifies the text of the command to be issued (VTAM Display command in this case).
Sets a CONDITIONAL wait time of 30 seconds. Meaning the total wait time for collecting output will be up to 30 seconds or until some stop trapping condition occurs. The stop trapping condition in the case of the single line MLWTO response will be the collection of the end-line of the command response.
Disables the stop trapping mechanism that measures the delivery time of each collected command output line.
Some command responses are in the form of multiple MLWTOs as illustrated with the following JES2 $DF command. For multiple MLWTO command responses that are directed back to the CA OPS/MVS console in which the command was issued, the most effective keywords are CMDWAIT(xx), INTERVAL(xx), and STOPEND(NO).
Multiple MLWTO-generated command response output as extracted from the OPSLOG:
OPSLOG Browse OPS11Q - CA11 --- OPSVIEW --- 09:50:25 05JUN2009 COLS 001 05 OPSF CnslName WTO ID ----+----1----+----2----+----3----+----4----+----5---- 8000 OPS11X01 00000000 $DF 3008 OPS11X01 1B0724D2 $HASP621 OUT R=LOCAL 3408 OPS11X01 1B0724D2 $HASP621 OUT R=LOCAL F=DPLX C=**** T=* 3608 OPS11X01 1B0724D2 $HASP621 PRMODE=LINE CLASS A=24 3008 OPS11X01 1B0724D3 $HASP621 OUT R=LOCAL 3408 OPS11X01 1B0724D3 $HASP621 OUT R=LOCAL F=GARY C=**** T=* 3608 OPS11X01 1B0724D3 $HASP621 PRMODE=LINE CLASS A=1 3008 OPS11X01 1B0724D4 $HASP621 OUT R=LOCAL 3408 OPS11X01 1B0724D4 $HASP621 OUT R=LOCAL F=OBER C=**** T=* 3608 OPS11X01 1B0724D4 $HASP621 PRMODE=LINE CLASS B=12 M=5 3008 OPS11X01 1B0724D5 $HASP621 OUT R=LOCAL 3408 OPS11X01 1B0724D5 $HASP621 OUT R=LOCAL F=STD C=**** T=* 3408 OPS11X01 1B0724D5 $HASP621 PRMODE=LINE CLASS A=1578 B=14 G=1 3608 OPS11X01 1B0724D5 $HASP621 CLASS P=95 R=95 S=3 T=5 X=21 3008 OPS11X01 1B0724D6 $HASP621 OUT R=LOCAL 3408 OPS11X01 1B0724D6 $HASP621 OUT R=LOCAL F=STD C=**** T=* 3608 OPS11X01 1B0724D6 $HASP621 PRMODE=LINE CLASS X=1
Using this JES2 $DF display command as an example, the following code illustrates issuing a command and collecting output that is returned as a multiple MLWTO (Primary line, followed by data lines, an end-line, then another sequence of primary line, data line, end-line etc. Notice the WTOID OPSLOG display in the $DF output that changes with each MLWTO occurrence.)
/*--------------------------------------------------------*/ /* Start out with a clean EDQ before issuing the command. */ /*--------------------------------------------------------*/ clearedq = OPSCLEDQ() /*--------------------------------------------------------*/ /* Issue the JES2 $DF command using the necessary command */ /* response trapping keywords. */ /*--------------------------------------------------------*/ address Oper "Command($DF) CMDWAIT(30) INTERVAL(300) STOPEND(NO)" /*--------------------------------------------------------*/ /* Simply display back the captured command responses. The*/ /* collected command responses are destined for the */ /* external data queue of the program and can be */ /* extracted and processed via the PULL instruction. */ /*--------------------------------------------------------*/ cmdoutlines = QUEUED() do cmdoutlines pull cmdoutput say '**>Output='cmdoutput end
The above sample uses the following keywords:
Specifies the text of the command to be issued (JES2 $DF Display command in this case).
Sets a CONDITIONAL wait time of 30 seconds. Meaning the total wait time for collecting output will be up to 30 seconds or until some stop trapping condition occurs. The stop trapping condition in the case of this JES2 $DF command response will be the INTERVAL condition as noted below.
Sets the stop trapping mechanism that measures the delivery time between each collected command output line to be that of 300 centiseconds. Therefore, when the delivery time of 300 centiseconds occurs, the response trapping will terminate.
The STOPRESP(message ID) keyword could optionally be utilized if the specified message ID indicates that all the desired output has been issued. Specific use of the STOPRESP keyword can be found in the example titled Using the STOPRESP and STOPMSG keywords to terminate response processing.
Some command responses are in the form of Single line WTOs as illustrated with the following z/OS Reset command. For single line WTO command responses that are directed back to the CA OPS/MVS console in which the command was issued, the most effective keywords are CMDWAIT(xx), INTERVAL(0) and STOPRESP(messageid).
Single line WTO generated command response output as extracted from the OPSLOG:
OPSLOG Browse OPS11Q - CA11 --- OPSVIEW --- 09:50:25 05JUN2009 COLS 001 05 OPSF CnslName WTO ID ----+----1----+----2----+----3----+----4----+----5---- 0000 OPS11X01 00000000 E PCPDA115,SRVCLASS=BATSTWLM 8008 OPS11X01 1B0724D2 IEE304I PCPDA115 JOB RESET
Using this z/OS Reset command as an example, the following code illustrates issuing a command and collecting output that is returned in the form of single line WTOs.
/*--------------------------------------------------------*/ /* Accept name of batch job from invoking MSG rule */ /*--------------------------------------------------------*/ arg jobname /*--------------------------------------------------------*/ /* Start out with a clean EDQ before issuing the command. */ /*--------------------------------------------------------*/ clearedq = OPSCLEDQ() /*--------------------------------------------------------*/ /* Issue the OS/390 reset command using the necessary */ /* command response trapping keywords. */ /*--------------------------------------------------------*/ address Oper "Command(E "jobname",SRVCLASS=BATSTWLM)", "CMDWAIT(30) INTERVAL(0) STOPRESP(IEE304I)" /*--------------------------------------------------------*/ /* Simply display back the captured command responses. The*/ /* collected command responses are destined for the */ /* external data queue of the program and can be */ /* extracted and processed via the PULL instruction. */ /*--------------------------------------------------------*/ cmdoutlines = QUEUED() do cmdoutlines pull cmdoutput say '**>Output='cmdoutput end
The following keywords are used within the above sample:
Specifies the text of the command to be issued with variable substitution. In this case, the z/OS Reset command.
Sets a CONDITIONAL wait time of 30 seconds. Meaning the total wait time for collecting output will be up to 30 seconds or until some stop trapping condition occurs. The stop trapping condition in the case of this z/OS reset command response will be the STOPRESP condition as noted below.
Disables the stop trapping mechanism that measures the delivery time between each collected command output line. This mechanism is being disabled since the command response in the case of the z/OS Reset command generates a specific message ID that can be used within the STOPRESP() keyword.
Sets the stop trapping mechanism to be that of the command response message IEE304I. Meaning with CMDWAIT(30), the total time of command response collection will be up to 30 seconds or until the message IEE304I is collected as set using this STOPRESP keyword.
Typically, most command responses are internally directed back to the console that issued the command. However, there are some product specific commands in which the command responses are directed elsewhere; such as to the master console or the system log. For command responses that are not directed back to the CA OPS/MVS console in which the command was issued, the most effective keywords are CMDWAIT(xx), INTERVAL(0), CAPTURE(message, messages, or message prefix) and STOPMSG(message ID).
Single line WTO generated command response output as extracted from the OPSLOG:
OPSLOG Browse OPS11Q - CA11 -- OPSVIEW -- 09:50:25 05JUN2006 COLS 001 05 CnslName Message ID ----+----1----+----2----+----3----+----4----+----5---- OPS11X01 MODIFY F PTX0099,DISPLAY NONE PXM0105 PXM0105 CA/XMANAGER MODIFY IN PROGRESS XMID=1154 NONE PXM0107 PXM0107 MODIFY TEXT = DISPLAY NONE PXM0111 PXM0111 XMANAGER DISPLAY WORKLOAD IN PROGRESS NONE PXM0112 PXM0112 XMANAGER CURRENTLY HAS NO WORKLOAD NONE PXM0109 PXM0109 XMANAGER MODIFY PROCESSING COMPLETE
Using this CA XMANAGER Display command as an example, note the CONSNAME field of the OPSLOG for the command responses not being sent back to console that issued the DISPLAY command. The following code illustrates issuing a command and collecting output not routed back to the issuing console using this CA XMANAGER command as an example.
/*--------------------------------------------------------*/ /* Start out with a clean EDQ before issuing the command. */ /*--------------------------------------------------------*/ clearedq = OPSCLEDQ() /*--------------------------------------------------------*/ /* Issue the XMANAGER command using the necessary */ /* command response trapping keywords. */ /*--------------------------------------------------------*/ address Oper "Command(F PTX0099,DISPLAY) Cmdwait(30)", "Capture(PXM) Interval(0) Stopmsg(PXM0109)" /*--------------------------------------------------------*/ /* Simply display back the captured command responses. The*/ /* collected command responses are destined for the */ /* external data queue of the program and can be */ /* extracted and processed via the PULL instruction. */ /*--------------------------------------------------------*/ cmdoutlines = QUEUED() do cmdoutlines pull cmdoutput say '**>Output='cmdoutput end
The following keywords are used within the above sample:
Specifies the text of the command to be issued.
Sets a CONDITIONAL wait time of 30 seconds. This sets the total wait time for collecting output to up to 30 seconds or until some stop trapping condition occurs. The stop trapping condition in the case of this XMANAGER command response will be the STOPMSG condition as noted below.
By default, only console directed command responses are collected. This keyword causes the code to collect or capture these all nonconsole directed PXM messages.
Disables the stop trapping mechanism that measures the delivery time between each collected command output line. This mechanism is being disabled since the command response in the case of the XMANAGER Display command generates a specific message ID that can be used within the STOPMSG() keyword.
Sets the stop trapping mechanism to be that of the command response message PXM0109. This means that with CMDWAIT(30), the total time of command response collection will be up to 30 seconds or until the message PXM0109 is collected as set through this STOPMSG keyword.
This example uses the STOPRESP Keyword to collect command responses issued back to the issuing console in the form of multiple MLWTOS with a unique ending message.
For command responses that are directed back to the issuing CA OPS/MVS console in the form of multiple MLWTOs, and that contain a unique message ID indicating all desired output has been sent, the most effective keywords are CMDWAIT(xx), INTERVAL(0), STOPEND(NO) and STOPRESP(messageid).
Multiple MLWTO command response with a unique message that indicates end of response as extracted from the OPSLOG:
OPSLOG Browse OPS11Q - CA11 --- OPSVIEW --- 10:33:54 12JUN2006 COLS 001 065 OPSF CnslName ----+----1----+----2----+----3----+----4----+----5----+----6--+ 8000 OPS11X01 !PP1ADIS DB(DSNDB01) SPACENAM(DBD01) LIMIT(*) LOCKS 8008 OPS11X01 DSNT360I !PP1A *********************************** 2808 OPS11X01 DSNT361I !PP1A * DISPLAY DATABASE SUMMARY 2E08 OPS11X01 * GLOBAL LOCKS 8008 OPS11X01 DSNT360I !PP1A *********************************** 2808 OPS11X01 DSNT362I !PP1A DATABASE = DSNDB01 STATUS = RW 2E08 OPS11X01 DBD LENGTH = 8000 2808 OPS11X01 DSNT397I !PP1A 2C08 OPS11X01 NAME TYPE PART STATUS CONNID CORRID LOCKI 2C08 OPS11X01 -------- ---- ---- ------------------ -------- ------------ --- 2C08 OPS11X01 DBD01 TS RW H-S,P 2C08 OPS11X01 - MEMBER NAME PP4A 2C08 OPS11X01 DBD01 TS RW H-S,P 2C08 OPS11X01 - MEMBER NAME PP1A 2E08 OPS11X01 ******* DISPLAY OF DATABASE DSNDB01 ENDED ***************** 8008 OPS11X01 DSN9022I !PP1A DSNTDDIS 'DISPLAY DATABASE' NORMAL COMPLETION
Using this DB2 display command as an example, note the multiple MLWTO response and the unique DSN9022I message that indicates the response is complete. The following code illustrates issuing this type of command and collecting the output.
/*--------------------------------------------------------*/ /* Start out with a clean EDQ before issuing the command. */ /*--------------------------------------------------------*/ clearedq = OPSCLEDQ() /*--------------------------------------------------------*/ /* Issue the DB2 Thread display command */ /*--------------------------------------------------------*/ address Oper "C(!PP1ADIS DB(DSNDB01) SPACENAM(DBD01) LIMIT(*) LOCKS)", "CMDWAIT(30) STOPRESP(DSN9022I) INTERVAL(0) STOPEND(NO)" /*--------------------------------------------------------*/ /* Simply display back the captured command responses. The*/ /* collected command responses are destined for the */ /* external data queue of the program and can be */ /* extracted and processed via the PULL instruction. */ /*--------------------------------------------------------*/ cmdoutlines = QUEUED() do cmdoutlines pull cmdoutput say '**>Output='cmdoutput end
Specifies the text of the command to be issued.
Sets a CONDITIONAL wait time of 30 seconds. Meaning the total wait time for collecting output will be up to 30 seconds or until some stop trapping condition occurs. The stop trapping condition in the case of this DB2 command response will be the STOPRESP condition.
Disables the stop trapping mechanism that measures the delivery time between each collected command output line. This mechanism is being disabled since the command response in the case of this DB2 Display command generates a specific message ID that can be used within the STOPRESP() keyword.
Sets the stop trapping mechanism to be that of the command response message DSN9022I being sent back to the issuing console. This means that with CMDWAIT(30), the total time of command response collection will be up to 30 seconds or until the message DSN9022I is collected as set via this STOPRESP keyword.
These examples both issue the QUERY IMSPLEX command in IMS Type 2 Message format.
”C(QUERY IMSPLEX) CMDRESP(REXX) IMSID(*) IMSPLEX(IPLEX)”
”C(QUERY IMSPLEX) CMDRESP(REXX) IMSID(IMSS) IMSPLEX(*)”
| Copyright © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |