COBOL Manual for TNS and TNS/R Programs

Libraries and Utility Routines
HP COBOL Manual for TNS and TNS/R Programs522555-006
13-135
PUTPARAMTEXT
result
is a DISPLAY or COMPUTATIONAL numeric data item assigned the result
returned by PUTPARAMTEXT. Example:
04 RESULT PIC S9999 COMPUTATIONAL.
PUTPARAMTEXT operates on the saved PARAM message. The program must have
included a SAVE directive to save the message.
Changing the saved PARAM message has no effect on the current process. Any
DEBUG, SWITCH-nn, NONSTOP, or other named parameters are permanently
established for a given process by the initialization code that the process executes
before the first statement of the COBOL program. Any process initiated by the current
process after execution of the PUTPARAMTEXT routine inherits the modified PARAM
message.
PUTPARAMTEXT returns an integer value that indicates the outcome of this operation.
If the PARAM message does not exist, the PUTPARAMTEXT routine attempts to
create one containing the supplied parameter name and value. If this operation fails, a
-1, -2, or -3 value is returned. The integer values are interpreted:
The PARAM message creation is successful if both message space and cplist
space are available, and the new message contains only the parameter name and
value supplied to PUTPARAMTEXT.
Value Meaning
0 or positive integer A string of value characters is assigned as the new parameter
value. If the string is all spaces, a 0 is returned.
-1 Failure due to a logic error. Nothing is changed. These are possible
logic errors:
The portion identifier is not correct.
The new parameter value string exceeds 255 characters.
The total length of the new PARAM message exceeds the
maximum.
The contents of the checkpoint list parameter are inconsistent.
-2 Insufficient checkpoint list space is available to complete the
operation. The message does not change.
-3 Insufficient stack space to create or replace message. The message
is unchanged. Moving large data items from the Working-Storage
Section to the Extended-Storage Section, either manually or with the
LARGEDATA directive, might solve the problem.