IBM SC34-6814-04 Server User Manual


 
Following successful tokenizing, the main program calls DFH99FP to analyze the
verb keyword. DFH99FP calls DFH99LK to look up the verb keyword in the table,
DFH99T. DFH99LK calls DFH99MT if an abbreviation is possible. Upon finding the
matching verb, DFH99FP puts the address of the operand section of the table into
COMM, and puts the function code into the DYNALLOC request block.
The main program now calls DFH99KO to process the operand keywords. Each
keyword in turn is looked up in the table by calling DFH99LK, and the value coded
for the keyword is checked against the attributes in the table. DFH99KO then starts
off a text unit with the appropriate code and, depending on the attributes the value
should have, calls a conversion routine.
For character and numeric strings, DFH99CC is called. It validates the string, and
puts its length and value into the text unit.
For binary variables, DFH99BC is called. It validates the value, converts it to binary
of the required length, and puts its length and value into the text unit.
For keyword values, DFH99KC is called. It looks up the value in the description part
of the keyword table using DFH99LK, and puts the coded equivalent value and its
length into the text unit.
When a keyword specifying a returned value is encountered, DHF99KO makes an
entry on the returned value chain, which is anchored in COMM. This addresses the
keyword entry in DFH99T, the text unit where the value is returned, and the next
entry. In this case the conversion routine is still called, but it only reserves storage
in the text unit, setting the length to the maximum and the value to zeros.
When all the operand keywords have been processed, DFH99KO returns to the
main program, which calls DFH99DY to issue the DYNALLOC request.
DFH99DY sets up the remaining parts of the parameter list and, if no errors too
severe have been detected, a subtask is attached to issue the DYNALLOC SVC. A
WAIT EVENT is then issued against the subtask termination ECB. When the
subtask ends and CICS dispatches the program again, the DYNALLOC return code
is captured from the subtask ECB and the error and reason codes from the
DYNALLOC request block and a message is issued to give these values to the
terminal.
DFH99DY then returns to the main program, which calls DFH99RP to process
returned values. DFH99RP scans the returned value chain, and for each element
issues a message containing the keyword and the value found in the text unit. If a
returned value corresponds to a keyword value, DFH99KR is called to look up the
value in the description, and issue the message.
Processing of the command is now complete, and the main program is reinitialized
for the next one, and loops back to the point where it calls DFH99GI.
Messages are issued at many places, using macros. The macro expansion ends
with a call to DFH99MP, which ensures that a new line is started for each new
message, and calls DFH99ML, the message editor. Input to the message editor is a
list of tokens, and each one is picked up in turn and converted to displayable text.
For each piece of text, DFH99TX is called, which inserts the text into the output
buffer, starting a new line if necessary. This ensures that a word is never split over
two lines.
Chapter 30. The dynamic allocation sample program 785