COBOL Manual for TNS and TNS/R Programs
Libraries and Utility Routines
HP COBOL Manual for TNS and TNS/R Programs—522555-006
13-124
GETPARAMTEXT
text
is the alphanumeric data item in 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:
13 TEXT-VALUE PIC X(120).
The text returned from a specific PARAM message parameter is the parameter
value associated with that parameter name. It can have a maximum of 255
characters.
result
is a DISPLAY or COMPUTATIONAL numeric data item assigned the result
returned by GETPARAMTEXT. Example:
04 RESULT PIC S9999 COMPUTATIONAL.
GETPARAMTEXT operates on the saved PARAM message. The program must have
included a SAVE directive to save the message.
GETPARAMTEXT returns an integer value that indicates the outcome of this operation.
The integer values and their meanings are:
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 that is not COMPUTATIONAL). The utility stores the
characters it receives into the data item specified by text, ignoring COBOL MOVE rules.
Value Meaning
0 or greater A string of value characters, before truncation or padding, is assigned to
text. If the parameter value is a null string, a 0 is returned.
-1 Failure due to a logic error; nothing is assigned to text. These are possible
logic errors:
•
The PARAM message does not exist.
•
The portion identifier is not correct or identifies a parameter that does not
exist in the PARAM message.