COBOL Manual for TNS and TNS/R Programs

Libraries and Utility Routines
HP COBOL Manual for TNS and TNS/R Programs522555-006
13-119
GETASSIGNTEXT
The text returned from a specific part of an ASSIGN message is:
message-number
identifies a specific ASSIGN message. message-number can be a DISPLAY or
COMPUTATIONAL numeric data item, a numeric literal, or an expression enclosed
in parentheses. The value must evaluate to a positive integer. Example:
03 MESSAGE-NUMBER PIC S9999 COMPUTATIONAL.
Because each saved ASSIGN message is identified by a positive integer,
message-number refers to the integer value of the specific message. The set of
numbers associated with the ASSIGN messages are integers from 1 to N, where N
is normally the number of ASSIGN messages saved during the initial process
creation.
result
is a DISPLAY or COMPUTATIONAL numeric data item assigned the text returned
by GETASSIGNTEXT. Example:
03 RESULT PIC S9999 COMPUTATIONAL.
GETASSIGNTEXT operates on the saved ASSIGN messages. The program must
have included a SAVE directive to save the message.
LOGICALNAME The text contains the program unit name and
the logical file name, formatted like this, with
a maximum of 63 characters:
programunit.filename
If the logical name does not include the
program unit name, the text contains only
this, with no qualifier:
filename
TANDEMNAME The text is the file-system file name and can
have a maximum of 34 characters. The file
name can be all spaces.
Note. The text parameter must be declared as alphanumeric. Binder cannot detect the
nuances between the various forms of byte-addressed COBOL data (such as numeric or
alphanumeric edited data items that are not COMPUTATIONAL). The utility stores the
characters it receives into the data item specified by text, ignoring COBOL MOVE rules.