NetBatch Management Programming Manual

NetBatch Procedure Calls
NetBatch Management Programming Manual522462-003
7-32
Sample TAL Program
.open^table,
.nb^job^num;
STRING .att^set;
EXTERNAL;
?NOLIST
--System procedures library
?SOURCE $SYSTEM.SYSTEM.EXTDECS0
--Location of NB^JOB^SUBMIT
?SEARCH $SYSTEM.SYSTEM.BATCHLIB
?LIST
!----------------------------------------------------------!
! !
! This proc is invoked by the INITIALIZER system routine.!
! It: !
! !
! a) Gets the system Startup message !
! b) Stores the message details in a structure !
! !
!----------------------------------------------------------!
PROC startup^proc (rucb, start^data, msg, msg^length, match) VARIABLE;
INT .rucb,
.start^data,
.msg,
msg^length,
match;
BEGIN
startup^msg.msgcode ':=' msg[0] FOR msg^length/2;
END;
!----------------------------------------------------------!
! !
! This is the main proc of this program. !
! It: !
! !
! a) Invokes the INITIALIZER system procedure !
! b) Opens the output file (terminal) !
! c) Sets up the structures required by NB^JOB^SUBMIT !
! d) Submits a job via NB^JOB^SUBMIT !
! e) Interprets any errors returned by the scheduler !
! and displays them on the screen !
! f) Display the job name and number on the screen !
! g) Closes the output file (terminal) !
! !
!--------------------------------------------------------- !
--Main procedure
PROC submit^job MAIN;
BEGIN
(continued)