CATALOGUED()

CATALOGUED()

Top  Previous  Next

 

The CATALOGUED() function determines whether a subroutine can be found using the search process described for the CALL statement.

 

 

Format

 

CATALOGUED(name)

 

where

 

nameis the calling name of the program

 

The CATALOGUED() function returns

0the subroutine is not catalogued
1the subroutine is catalogued locally using a V-type VOC entry
2the subroutine is catalogued privately
3the subroutine is catalogued globally

 

Where a subroutine name appears in more than one catalogue form, the search order is as in the list above and the value returned reflects the first entry found.

 

The return value from the CATALOGUED() function can be treated as a Boolean (True/False) value if the application merely wants to determine if a subroutine is catalogued and does not need to know in which format.

 

 

 

Example

 

IF NOT(CATALOGUED('MYPROG')) THEN DISPLAY 'Not catalogued'

 

This statement displays a message if MYPROG is not in the system catalogue.

 

 

See also:

CATALOGUE, CALL