SD - The Open Source, Multivalue, String, Database
SD Basic Function - CATALOGUED
OpenQM 2.6.6 documentation for this command is available here. The OpenQM documentation may provide additional context for this command. However, some features in SD have been modified so the OpenQM information may not be 100% applicable to SD.
The CATALOGUED() function determines whether a subroutine can be found using the search process described for the CALL statement.
Format: CATALOGUED(name)
Parameters: name is the calling name of the program
The CATALOGUED() function returns
0 the subroutine is not catalogued
1 the subroutine is catalogued locally as a V type VOC entry
2 the subroutine is catalogued privately
3 the 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