NetBatch Management Programming Manual
SPI Programming Considerations for the NetBatch 
Subsystem
NetBatch Management Programming Manual—522462-003
3-5
Subjects of Event Messages
of the form ZBAT-EVT-name, where name identifies the event. For example, the event 
reporting that a job started is represented by the name ZBAT-EVT-JOB-START. 
In NetBatch event messages, the event-number header token (ZEMS-TKN-
EVENTNUMBER) can assume any of the set of NetBatch event numbers. For 
descriptions of NetBatch event messages, see Section 6, Event Messages.
Subjects of Event Messages
Each NetBatch event message contains a subject token, ZBAT-TKN-SCHEDULER-ID, 
which immediately follows the ZEMS-TKN-SUBJECT-MARK token. The subject token 
identifies the scheduler generating the event message. Only one subject token is 
present in each scheduler event message. 
Data Lists and Error Lists
Responses from the NetBatch subsystem can contain data lists and error lists, as 
described in the SPI Programming Manual. The response buffer might contain one or 
more data lists if the ZSPI-TKN-MAXRESP token is not zero. 
Using SPI to Build Commands and Decode Responses
The SPI Programming Manual provides detailed information on building and sending a 
command message and on receiving and decoding a response message. These 
subsections summarize the steps your application must take to perform each of these 
tasks and discuss NetBatch subsystem-specific programming considerations. 
Building and Sending a Command Message
To build and send a command message to the NetBatch subsystem:
1. Declare a buffer of appropriate size. NetBatch buffer declarations are:
For more information on NetBatch buffer declarations, see Section 4, Common 
Definitions. 
For sending commands, the size of the buffer you select must be passed as a 
parameter to SSINIT. You also must allocate a buffer of the chosen size in the 
program’s data space or in an extended data segment. 
2. Call procedure SSINIT, supplying the buffer, buffer length, subsystem ID, 
command, and object type. SSINIT initializes the buffer, placing the supplied 
information in the appropriate fields of the message header. 
3. Call procedure SSNULL to initialize to null values the fields of each extensible 
structured token in the command. 
Buffer Declaration Buffer Size
ZBAT-DDL-MSG-BUFFER ZBAT-VAL-BUFLEN (2042 bytes)
ZBAT-DDL-MSG-BUFFER-MAX ZBAT-VAL-BUFLEN-MAX (4090 bytes)
ZBAT-DDL-MSG-BUFFER-MIN ZBAT-VAL-BUFLEN-MIN (1018 bytes)










