COBOL Manual for TNS and TNS/R Programs
Libraries and Utility Routines
HP COBOL Manual for TNS and TNS/R Programsā522555-006
13-126
GETSTARTUPTEXT
The text values returned from specific startup message parts are:
result
is a DISPLAY or COMPUTATIONAL numeric data item assigned the result
returned by GETSTARTUPTEXT. Example:
77 RESULT PIC S9999 COMPUTATIONAL.
GETSTARTUPTEXT operates on the saved startup message. The program must have
included a SAVE directive to save the message.
GETSTARTUPTEXT returns an integer value that indicates the outcome of this
operation. The integer values are interpreted:
VOLUME The text contains the default system, volume, and subvolume
names, formatted like this, with a maximum of 25 characters:
\system.$volume.subvol
If the volume part does not include the system name component,
the text contains only this, with no system qualifier:
$volume.subvol
IN The text is the file system name of the input file and can have a
maximum of 35 characters. The file name can be all spaces.
OUT The text is the file system name of the output file name and can
have a maximum of 35 characters. The file name can be all
spaces.
STRING The text is the startup messageās parameter string, not including
trailing null characters, and can have a maximum of 526
characters.
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 file system name of the file is all spaces, a 0 is returned for IN or
OUT. If the value is all spaces or a null string, a 0 is returned for STRING.
-1 Failure due to a logic error; nothing is assigned to text. These are possible
logic errors:
ā¢
The startup message does not exist.
ā¢
The portion identifier is not correct or does not identify a defined part of
the startup message.