|
|
SNA NRJE User/Programmer Reference Manual: HP 3000 MPE/iX Computer Systems > Appendix A Parsing Algoithms and User Exit ProceduresBanner Decode Exit Procedure Specification |
|
A description of the exit procedure to be used to parse host output banner pages is given below.
The exit procedure name is specified in the NMMGR Writer Data screen. A different procedure can be accessed by each logical writer. Note that the banner decode exit procedure is optional, and need not be specified unless NRJE's internal banner decode algorithm and output routing mechanism are not sufficient. Refer to "Banner Decode Parsing Algorithms," earlier in this chapter, for additional information. The exit procedure can implement any one of three functions:
The exit procedure will be passed each record of a received data set, beginning with the PDIR, until the procedure returns a non-blank value for Jobnum, a non-zero Jobnum, or a non-zero value for Filenum. If either value is returned by NRJE, NRJE will not call the exit procedure again until the next data set is received, except for this condition: If a PDIR is received for which:
then the exit procedure will be called again. If the procedure returns a job number or file number to NRJE, the original file will be closed and the new output file will be used. If the DataLine passed is a data record, the data line will be decompressed and translated as specified by the logical writer receiving the data set. If the received DataLine is a PDIR, the first four bytes will be passed without translation, and the remaining bytes in the record will be translated using the Native-3000 EBCDIC-to-ASCII translation table. NRJE will save each banner line in an internal data structure, up to a maximum of 1024 lines. If Jobnum is not blank, nor is it the "minus, one, blank, blank" ASCII character string, NRJE accesses the Job Log to determine the proper output destination. The saved banner lines are printed if Action is returned with a value of zero; otherwise, the saved banner lines are not printed. Allowing for the one exception described above, no subsequent calls are made to the exit procedure until the next data set is received. If Filenum is not zero, NRJE writes the data set to the file opened by the exit procedure. If Action is returned with a value of zero, the saved banner lines are printed; otherwise, the saved banner lines are not printed. If both Jobnum and Filenum are returned by the exit procedure, NRJE uses Filenum to route the data set and ignores Jobnum. Action is interpreted as described above. If neither Filenum nor Jobnum is returned, NRJE passes the entire data set to the procedure and logs a warning message. NRJE assumes that the exit procedure is handling all output routing and writing operations. If an exit procedure opens an output file by using the COMMAND intrinsic to execute a file equation, and then uses an FOPEN that back-references the file equation, it should also issue a RESET (using the COMMAND intrinsic) to remove the file equation before returning to NRJE. This is required to minimize the possibility of NRJE misrouting output on other writers. For "End of Data Set" calls to the exit procedure (line length of -1), the returned values for Filenum and Jobnum are ignored. This hierarchy is used to resolve any routing specification conflicts: Banner Decode Filenum return overrides Job Log routing information (SUBMIT command parms) overrides Lookup Table form-to-file mapping (user's JCL "FORM" specification) overrides Defaults. The procedure will be called by the SNA NRJE Logical Unit, which will be running with traps on, in user mode. The NRJELU is "prepped" with PM, PH, DS, MR, IA, and BA capabilities. An SPL example of a banner decode exit procedure for use with JES2 banners is shown below. This example is also in the SAMPEXIT sample file in NRJE.SYS.
|
|