NetBatch Management Programming Manual

Sample Programs
NetBatch Management Programming Manual522462-003
C-42
Sample TAL Program
Step 5: Compile the Source File
End the EDIT session and compile the source file:
*EXIT
> TAL /IN TEMP.TALSRC/ TEMP.TALOBJ; SUPPRESS
Step 6: Test the Program
Test the program by running the compiled object:
> RUN TEMP.TALOBJ
Job submitted to $ZBAT using SPI
Job number : 008
Job name : TAL-JOB
Job status from $ZBAT using SPI
Selpri : 3
Class : OPERATIONS
Step 7: Delete the Submitted Job
> BATCHCOM $ZBAT; DELETE JOB TAL-JOB
Job TAL-JOB Jobnumber 8 deleted
Example C-4. Sample SPI TAL Program
?SYMBOLS, INSPECT
?HIGHPIN, HIGHREQUESTERS
-- SPI standard definitions
?NOLIST, SOURCE $ISV.ZSPIDEF.ZSPITAL
-- NetBatch TAL definitions
?NOLIST, SOURCE $ISV.ZSPIDEF.ZBATTAL
?LIST
-- Defines
DEFINE stopwitherror(t,l) =
CALL PROCESS_STOP_(,,,2,error,,t:l) #;
-- Startup-message offsets
LITERAL _defaults = 1;
LITERAL _in = 1+8;
LITERAL _out = 1+8+12;
LITERAL _text = (1+8+12+12)*2;
--
LITERAL spi_occurs = 2;
LITERAL max_file_length = 24;
LITERAL maxfilewords = 20;
LITERAL maxfilebytes = 40;
--
(continued)