Batch SPOC format

The Batch SPOC is a utility program that uses OM services to submit IMS™ operator commands to an IMSplex. The utility program is not specific to DRD commands; it accepts any commands that are supported by the OM API.

The Batch SPOC utility is invoked by use of standard JCL statements. The following example shows a simple invocation:

//SPOCJOB   JOB , 
//   MSGCLASS=H,NOTIFY=&SYSUID,USER=&SYSUID//*
//SPOC      EXEC PGM=CSLUSPOC,
//  PARM=('IMSPLEX=PLEX1,ROUTE=IMS3,WAIT=30,F=WRAP')  
//STEPLIB   DD DISP=SHR,DSN=IMS.SDFSRESL 
//SYSPRINT  DD SYSOUT=*
//SYSIN     DD *
 QRY IMSPLEX SHOW(JOB,TYPE,   +
                  STATUS)

 QRY TRAN NAME(INV1*) SHOW(ALL) /* inventory appl */
/*EOF
The program parameters define the IMSplex environment. The parameter keywords are:
IMSPLEX
Required parameter that specifies the 1- to 5-character suffix of the IMSplex name.
F
Optional parameter that specifies the print format of the SPOC output. You can specify one of the following values:
WRAP
Wraps to the next line as needed. This is the default.
BYCOL
Lines of data are grouped together by the column.
BYRSC
Lines of data are grouped together by the resource.
ROUTE
Start of changeOptional parameter that specifies the SYSIDs of IMSplex members that are to execute the command. If ROUTE is not specified, all members of the IMSplex will execute the command. If more than one member is specified, enclose the list in parenthesis and separate the names with commas. For example:
//  PARM=('IMSPLEX=PLEX1,WAIT=30,ROUTE=(IMSZ,IMSA)')

If ROUTE=* is specified, the command is routed to all registered command processing clients in the IMSplex. If ROUTE=% is specified, the command is routed to only one command processing client in the IMSplex that is registered for the command and that has MASTER capability. The Operations Manager chooses the command processing client.

End of change
WAIT
Optional parameter that specifies the wait time for individual commands. The wait value is in minutes and seconds (MMM:SS) or just seconds (SSSSS). OM will return a single response as soon as a response is received from all of the members of the IMSplex. If the interval expires, OM will return any responses from IMSplex members, plus an indication that some did not reply. The Batch SPOC utility will wait for each command to complete before issuing the next command. The default wait value is five minutes (5:00). The WAIT time applies to every command in the SYSIN file. The user can specify a wait time of zero seconds; in this case, the batch SPOC issues a command but does not wait for the response.

The SYSIN file is provided by the user and contains the commands that the user wants to run. The commands are run serially. When one command completes, the next command is run until all records from the SYSIN file are processed. Continuation of the SYSIN control statements is specified by a plus sign (+) or a minus sign (-) as the last non-blank character of the line. A plus sign removes the leading spaces from the next line; a minus sign keeps leading spaces. Comments can be included within the SYSIN file and are specified as:

/* this is a comment */ 

Start of changeIf the SYSIN is from a dataset, the DCB attributes must be set to LRECL=80 and BLKSIZE=80.End of change

The SYSPRINT file will have the formatted command response. If more than one command is issued, the responses will appear in the same order as the commands appear in the SYSIN file. The default record length is 133. The command response is formatted in a similar format as the TSO SPOC display. If the records are too long, they wrap to the next line. The user may specify DCB information in the JCL or in the data set allocation to allow longer records in the SYSPRINT file.

System Display and Search Facility (SDSF) can be used to view batch job output. The following is an example of batch job output:

========================================================
Log for. . : QRY IMSPLEX SHOW(MEMBER,TYPE,STATUS)
IMSplex . . . . . : PLEX1
Routing . . . . . :
Start time. . . . : 2005.132 15:36:28.11
Stop time . . . . : 2005.132 15:36:29.17
Return code . . . : 00000000
Reason code . . . : 00000000
Command master. . : SYS3
IMSplex  MbrName    CC Member   Type  Status
CSLPLEX1 OM1         0 SYS3     DBDC  ACTIVE
CSLPLEX1 OM1         0 IMS2     DBDC  ACTIVE
=======================================================

If no wait time, WAIT=0, is specified, the command response is not available and therefore are not printed. The SYSPRINT file will only have short summary information for each command. The following is an example of bath job output with no response:

========================================================
Log for. . : QRY IMSPLEX SHOW(MEMBER,TYPE,STATUS)
IMSplex . . . . . : PLEX1
Routing . . . . . :
Start time. . . . : 2006.075 15:36:28.11
========================================================