Slide 43 of 80
Notes:
- The next few slides detail the two alternate entry points for the STREAM UDC. If the entry is not “main” then it is an alternate entry. The first step is to determine which entry is being called by extracting the entry name. By convention the entry name is the last parameter passed to the UDC, and thus is extracted via word(…,-1).
- Next, the “entry=name” needs to be removed from the parameter line so that the alternate entry routines can freely parse the arguments.
- Now a test can be made for each individual entry name, and each entry point can be coded like a subroutine. All entries have read and write access to all of the variables set by the UDC.
- The “read_jobcard” entry defines the first parameter (arg1) to be the name of a CI string variable that will contain the full job “card” line minus the pseudo colon and the word “JOB” (“!JOB “).
- Input has been redirected to the stream job file, which the “main” entry verified exists.
- Since there can be comments preceding the JOB command line, these are skipped by the WHILE loop above. This WHILE loop reads the JOB record, via the input() function, and stops.
- A simple test is made to determine if the stream file is numbered or unnumbered: if the last 8 characters of the JOB card record are numeric then the entire file is considered numbered.