SNA NRJE User/Programmer Reference Manual (30292-90006)

218 AppendixA
Parsing Algoithms and User Exit Procedures
Parsing Algorithms
JES2 Algorithm
scan buffer for one of three keywords: "JOB" or "STC" or "TSU";
if found then skip trailing blanks;
if "JOB" found then
move while numeric to
JobNumber
variable
else
if "STC" or "TSU" found then
JobNumber
:= "-1";
NOTE
A
JobNumber
value of -1 indicates that the output is unsolicited and
that the Job Log should not be checked for routing information.
Punch Banner Decode Algorithms
The algorithm used by NRJE to parse punch output banners for data
sets returning from JES2 is shown below.
Translate first line of output using Hollerith table:
%160 (hex 70): to ASCII "0";
%221 - %231 (hex 91 to 99): to ASCII digits "1" through "9"
all other characters: to ASCII blank " ";
begin
translate from Hollerith to ASCII;
skip leading blanks;
for digit'count 0 to 7 do
begin
outnum(digit'count) := this'char;
scan while this'char;
skip trailing blanks;
digit'count := digit'count + 1;
end; { For digits 0 to 7}
if digit'count =4
then offset := digit'count - 4
move jobnumber := outnum(offset) , (4 bytes);
end; { Parse punch banner }