COBOL Manual for TNS and TNS/R Programs
Libraries and Utility Routines
HP COBOL Manual for TNS and TNS/R Programs—522555-006
13-109
CHECKLOGICALNAME
logical-name
program-unit
is an alphanumeric data item that specifies the name of the program unit.
file-name
is an alphanumeric data item that specifies the logical file name. program-
unit and file-name together, or file-name alone, compose the logical
file name. The logical file name can have a maximum of 63 characters
(including the period). Any trailing spaces are ignored. Example:
02 LOGICAL-NAME PIC X(64).
*
means that the file assignment applies to all programs in the object file.
result
is either a DISPLAY or COMPUTATIONAL numeric data item assigned the result
returned by CHECKLOGICALNAME. Example:
03 RESULT PIC S9999 COMPUTATIONAL.
CHECKLOGICALNAME operates on the saved ASSIGN messages. The program must
have included a SAVE directive to save the message.
CHECKLOGICALNAME returns one of these integer values to report whether the
requested message exists:
•
A 0 indicates that no saved ASSIGN message contains a matching logical file
name text.
•
A positive value is the message number of the saved ASSIGN message having a
logical file name text that matches the one supplied.
•
A negative value is the negative message number of the saved ASSIGN message
having a logical file name text that conflicts with the one supplied. The names can
conflict when only one is qualified or when one is qualified by an asterisk (*) and
the other is qualified by a program name. If there is more than one conflicting
saved ASSIGN message, the message number of the first ASSIGN message
located is returned as a negative value.
.
*
file-name
program-unit
VST639.vsd