SNA NRJE User/Programmer Reference Manual (30292-90006)
222 AppendixA
Parsing Algoithms and User Exit Procedures
Banner Decode Exit Procedure Specification
2. Open the output file for NRJE by returning
Filenum
rather than
Jobnum
. NRJE then writes the data set to the file.
3. Open and write the entire data set to the output file. This is
accomplished by not setting either of the output parms (
Filenum
or
Jobnum
), which causes NRJE to pass the entire data set to the
procedure. FWRITE error handling is then the responsibility of the
procedure.
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:
• FORM name has changed, or
• FCB name has changed, or
• number of copies has changed, or
• number of copies is not 0,
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.