X"91" function 15

Checks for the existence of the specified program.
Restriction:
  • This routine is not supported when CHARSET"EBCDIC" is in effect.
  • This function is not supported in JVM COBOL.

Syntax:

call x"91" using result
                 function-code
                 parameter

Parameters:

result
Using call prototype (see Library Routines - Key) : cblt-x1-compx
Picture: pic x comp-x.
function-code
Using call prototype (see Library Routines - Key) : cblt-x1-compx
Picture: pic x comp-x.
parameter
Group containing:
name-len   cblt-x1-compx   *> pic x comp-x
progname   pic x(n)        *> pic x(n)

On Entry:

function-code Value 15
name-len The length of the name in filename.
progname The name of the program to be looked for. This parameter must be at least 65 characters long.

On Exit:

progname If the program is found, contains the full name.
result Set to zero if the program was found, non-zero otherwise.

Comments:

If the program file is found, you must then call the program using the filename returned.

This call must not be used to check for the existence of data files; use CBL_CHECK_FILE_EXIST instead.