PRINT-CATALOG

Displays information about cataloged DataBasic programs.

Syntax

PRINT-CATALOG {fileSpecifier} {itemList} {(options}

Syntax Elements

fileSpecifier The file containing the cataloged programs (see General Conventions). If omitted, itemList is assumed to refer to programs cataloged in the MD of the local account.

itemList A space-separated list containing the item-ids of the cataloged programs. These can be the item-ids of the MD entries, the executable items (in POINTER-FILE or the dictionary or data section of the file) or the deliverable items (see Introduction to DataBasic for descriptions of these different types of item).

If fileSpecifier has been included, an asterisk (*) can be used to specify all the items in the specified file.

Omit itemList if the item-ids are supplied by an immediately-preceding list-generating command.

Options

I Prompts for the account containing the cataloged items. Programs cataloged in the MD of the account specified will be listed instead of those from the local account.

P Sends output to the printer.

Operation

PRINT-CATALOG displays the following information:

Program The account, file name, data section name and program name.

Compiled on The compilation date and time.

Source The file name (including the data section, if appropriate) and item name of the source program.

Last updated The date on which the source item was last updated.

Run Emulation The DataBasic compatibility mode and runtime version (determined by the compiler version and $OPTIONS settings).

Byte order The byte order of the system on which the module was compiled and cataloged.

Title / comment The first header comment line in the source; that is, the first header comment line containing characters other than asterisks, exclamation marks and spaces.

Compiler version
The version of the compiler used to compile the code.

Variables The number of variables used within the module. As follows:

GLOBAL(count)Normal variables.

COMMON(count)Common variables (see COMMON statement).

commonName(count)
Variables in the specified named common section.

Parameter list The type of module and number and types of parameters (currently only shown for external functions).

Comments

If you specify a program that has not been cataloged, an error message is normally displayed. However, if you specify a file name and the program executable cannot be found in that file, but there is an MD or POINTER-FILE item with the specified name, details of that program will be displayed.

Note

You can display similar information for a program that has not been cataloged by using the dictionary SYS.BASLIB (SYSFILES account) to list the program. See Viewing Program Headers for details.

Alternative Syntax

The following syntax can also be used:

PRINT-CATALOG program account

where program is the name of a single cataloged program with an executable in the global POINTER-FILE, and account is an account name.

Example

:PRINT-CATALOG BP SQ

The following information is displayed about the cataloged program SQ in file BP in account PS:

Program         : PS BP $SQ
Compiled on : 09 Dec 10 at 08:43
Source : BP SQ
Last updated : 09 Dec 10
Run Emulation : Reality v14.2
Byte order : Reverse
Title / comment : Function SQ
Compiler version: Data/Basic 14.2 Version 8.7
Variables : GLOBAL(2)
Parameter list : FUNCTION (P1)

This shows that SQ is a function that accepts one parameter and uses two normal variables. It uses Reality compatibility mode and runtime version V14.2.