Processing NetBatch Jobs and Completion Codes
Initiating and Communicating With Processes
5–34
107365 Tandem Computers Incorporated
Figure 5-13. Checking Completion Codes (Page 2 of 2)
== Check the completion code; if an error occurred, display
== it and exit
[#IF [:_COMPLETION:COMPLETIONCODE] <> 0 |THEN|
#OUTPUT *** Error during preprocessing
#OUTPUT Completion code = [:_COMPLETION:COMPLETIONCODE]
#UNFRAME
#RETURN
]
== Compile and bind with COBOL85, again as a waited process
PARAM BINSERV $SYSTEM.SYSTEM.BINSERV
PARAM SYMSERV $SYSTEM.SYSTEM.SYMSERV
COBOL85 /name,CPU 3, PRI 140, IN CBLFL, OUT $S.#PM/APPOBJ
== Check the completion code; if an error occurred, display
== it and exit
[#IF [:_COMPLETION:COMPLETIONCODE] <> 0 |THEN|
#OUTPUT *** Error during COBOL85 compilation and binding
#OUTPUT Completion code = [:_COMPLETION:COMPLETIONCODE]
#UNFRAME
#RETURN
]
== SQL compilation; waited process
SQLCOMP /name,CPU 3, PRI 140, IN APPOBJ, OUT $S.#PM/
== Check the completion code; if an error occurred, display
== it and exit
[#IF [:_COMPLETION:COMPLETIONCODE] <> 0 |THEN|
#OUTPUT *** Error during SQL compilation
#OUTPUT Completion code = [:_COMPLETION:COMPLETIONCODE]
#UNFRAME
#RETURN
]