SNAX/HLS Application Programming Manual
SCOBOLX Applications
SNAX/HLS Programming Standards
104707 Tandem Computers Incorporated 1–7
Note, in particular, how the example tests the value for legal ranges. The variables
VERB-FIRST
and
VERB-LAST
are defined with the other verb values above.
IF VERB-CODE IS NOT < VERB-FIRST AND
VERB-CODE IS NOT > VERB-LAST
SUBTRACT VERB-FIRST FROM VERB-CODE GIVING ws-index
MOVE VERB-NAME-LIST (ws-index) TO Name-of-verb-code.
Section DT-NAME-TAB
Use the following statement to include the DT-NAME-TAB section of the copybook in
your program:
copy DT-NAME-TAB of HLSDDS.
This section defines the names (not the values) of the various SNAX/HLS data-type
codes. Its primary use is to enable your program to convert data-type values into the
standard name (without the DT- prefix and with all hyphens converted to
underscores). The data structure is as follows:
?SECTION DT-NAME-TAB
01 DT-NAME-TAB.
02 filler pic X(17) value "fm_header".
02 filler pic X(17) value "partner_data".
...
02 filler pic X(17) value "flow_control".
01 DT-NAME-TABR redefines DT-NAME-TAB.
02 DT-NAME-LIST occurs 13 times pic X(17).
The following fragment of code illustrates how your program might extract the data-
type name corresponding to a given data-type code. Note, in particular, how the
example tests the value for legal ranges and takes care of the specific case of a negative
value. The variables
DT-FIRST
and
DT-LAST
are defined with the other DT values
above.
IF DT IS NEGATIVE MOVE -1 TO DT.
IF DT IS NOT < DT-FIRST AND
DT IS NOT > DT-LAST
SUBTRACT DT-FIRST FROM DT GIVING ws-index
MOVE DT-NAME-LIST (ws-index) TO Name-of-data-type.