COBOL Manual for TNS and TNS/R Programs
Libraries and Utility Routines
HP COBOL Manual for TNS and TNS/R Programs—522555-006
13-118
GETASSIGNTEXT
GETASSIGNTEXT
The GETASSIGNTEXT routine gets part of an ASSIGN message as text and assigns it
to a string variable. The general form of the ENTER statement to use
GETASSIGNTEXT is:
library-reference
is a mnemonic-name associated in the SPECIAL-NAMES paragraph with either
$SYSTEM.SYSTEM.COBOLLIB or some other object file containing an object
copy of GETASSIGNTEXT.
portion
is an alphanumeric data item that supplies the identifier for the particular text part
of the message to be retrieved. The identifier must be one defined for the ASSIGN
message (see Table 13-13). The first unused character position of portion, if any,
must be a space. Example:
06 PORTION PIC X(30) VALUE "LOGICALNAME".
There is a special portion identifier, *ALL*, accepted by this routine. The *ALL*
identifier indicates that the routine must get the entire ASSIGN message. The
maximum size of the ASSIGN message is 108 characters. If you use a smaller
parameter, the routine truncates the message on the right. If you use a larger
parameter, the routine pads it on the right with spaces.
text
is an alphanumeric data item into which the retrieved text is placed. If this data item
is described with a JUSTIFIED clause, that clause is ignored. If the variable and
the retrieved text differ in length, the retrieved text is truncated or extended with
spaces as required. Example:
05 TEXT-VALUE PIC X(120).
Note. GETASSIGNTEXT uses a protocol different from that used for normal TAL procedures.
The ENTER verb must not be followed by the keyword TAL.
USING
library-reference
portion
OF
resultGIVING
text message-number
ENTER
" "
ns
GETASSIGNTEXT
ns
VST363.vsd