SNAX/HLS Application Programming Manual

SCOBOLX Applications
SNAX/HLS Programming Standards
1–6 104707 Tandem Computers Incorporated
This section defines the names (not the values) of the various SNAX/HLS verb
completion codes. Its primary use is to enable your program to convert return-code
values into the standard name (without the RC- prefix and with all hyphens
converted to underscores). The data structure itself is defined as follows:
?SECTION RC-NAME-TAB
01 RC-NAME-TAB.
02 filler pic X(23) value "ok".
...
02 filler pic X(23) value "session_not_allocated".
01 RC-NAME-TABR redefines RC-NAME-TAB.
02 RC-NAME-LIST occurs 30 times pic X(23).
The following fragment of code illustrates how your program might extract the
characters, given a return code value of RETURN-CODE.
Note, in particular, how the example tests the value for legal ranges. The variables
RC-FIRST
and
RC-LAST
are defined with the other RC-values above.
IF RETURN-CODE IS NOT < RC-FIRST AND
RETURN-CODE IS NOT > RC-LAST
SUBTRACT RC-FIRST FROM RETURN-CODE GIVING ws-index
MOVE RC-NAME-LIST (ws-index) TO Name-of-return-code.
This data area provides the internal names assigned to the error codes. They are the
same names used to name the variables. This should not be confused with the text
given by the CONVERT-ERROR-CODE request, which might have been translated
into another language. If your program plans to publish the explanation of return
codes, the use of CONVERT-ERROR-CODE is preferred.
Section VERB-NAME-TAB
Use the following statement to include the VERB-NAME-TAB section of the copybook
in your program:
copy VERB-NAME-TAB of HLSDDS.
This section defines the names (not the values) of the various SNAX/HLS verb codes.
It enables your program to convert verb-code values into the standard names (without
the VERB- prefix and with all hyphens converted to underscores). The data structure
itself is defined as follows:
?SECTION VERB-NAME-TAB
01 VERB-NAME-TAB.
02 filler pic X(21) value "open_session".
...
02 filler pic X(21) value "receive_control_wait".
01 VERB-NAME-TABR redefines VERB-NAME-TAB.
02 VERB-NAME-LIST occurs 20 times pic X(21).
The following fragment of code illustrates how your program might extract the verb
name, given a verb-code value of VERB-CODE.