catalog command

The catalog BASIC program creates an entry in the master dictionary of the current account, making the specified BASIC or BASIC program executable directly from the TCL prompt.


catalog file.reference itemlist* {(options}


file.reference Names the file containing the program to catalog. If no file is specified, it defaults to bp.
itemlist* Names the previously compiled BASIC programs to add to the master dictionary. If not specified, or if an * is used, all programs in the file are cataloged.
options f Places the full path (account,file, program) in the catalog pointer.
g For UNIX: Not Supported

For Windows: Adds a module to the global (domain) catalog for BASIC programs instead of creating an entry in the master dictionary for the current account.

o Overwrites any existing items, except for file-defining items and Q-pointers. A cataloged BASIC program item in the master dictionary has its name specified in attribute 4. If an item already exists in the master dictionary that is not in BASIC command format and the o option has not been specified, an error message displays indicating that the item is already on file and the program is not cataloged.
Warning: If an item exists in the master dictionary with the same name as the program and it is not a cataloged program pointer item, the catalog process fails and does not write over the conflicting master dictionary item.

Options may be placed on attribute 6 of the catalog pointer (command definition) for the catalog command, making those options the default behavior of the catalog command, in the same manner as placing default options on attribute 6 of the compile command.

If the cataloged program is a mainline program (not a subroutine or function), it can be executed by issuing its program name at the TCL prompt.

Once a program has been cataloged, it does not need to be cataloged again, even if it is changed and recompiled. Note that issuing the catalog command from TCL is the same as using the CTRL+XC on a BASIC program in the Update processor.

If there is currently a cataloged program with the same name, it is overwritten.

All external subroutines must be cataloged.

To activate a cataloged BASIC program, enter:{(options}

To activate a cataloged program, enter the program name at the TCL prompt character. All options available for the run command are allowed.

Note: On all D3 platforms, a program can be cataloged without the source being present.


Catalogs the testprog object in the dictionary of file bp.

catalog bp testprog
[244] ’testprog’ cataloged.