Catalog

PURPOSE:  CATALOG is an equated command that lists the names of data objects in a DBL on the terminal.  This utility command expands on the Directory command in ACCENT R.  You can select specific objects for display with the use of wild card names and optional clauses.  The data objects may be sorted by object type, name, creation or changed dates.

CATALOG indicates when no text is available and if an object needs to be saved.  All objects are sorted by name within each object type.  The display normally stops when the terminal screen is full and waits for a response to continue.  An option is provided to produce a display formatted with page breaks.  This output may be sent to the SF CATALOG.REP for later printing.

SYNTAX

*CATALOG [OF clause] [SHOW clause] [BY clause] [{DI; DS} clause] [PAGE clause]

OF clause

specifies the objects to be displayed.  Some examples of valid OF clauses are:

OF CURRENT displays all current DBL objects.

OF PM displays all PM.

OF PM *U displays all PM’s ending in U.

OF PM, CM displays all PM’s, CM.

OF DS Z* displays all DS that begin with Z.

OF DS *Z displays all DS’s names that end with Z.

OF DS %Z* displays all DS’s with a 2nd letter of Z.

OF ALL %% displays all 2 letter DBL objects.

OF PM X, Y displays PM X and Y.

OF PM X, Y; CM Z displays PM X, Y and CM Z.

Use a semicolon (;) to separate different DBL object types specified in the same OF clause.

SHOW clause

displays time stamp information.  The following fields are available with SHOW:

CREATE shows date / time when the DBL object was created.

CHANGE shows date / time when the DBL object was last changed.

DATES is the same as SHOW CREATE, CHANGE.

BY clause

indicates how to sort the display.  Multiple sorts are not allowed.  The following sorts are available:

BY NAME--Sorts by the name of each object.

BY TYPE--Sorts by the object type and object name (default sort).

BY CREATE--Sorts by the creation date/time of each object.

BY CHANGE--Sorts by the date/time each object was last changed.

BY NONE--Does not sort.

DI, DS clause

displays all DI or DS’s associated with a SD or all DI’s associated with a DS.

DS OF SD sd_name displays all DS’s related to SD objects.

DI OF SD sd_name displays all DI’s related to SD objects.

DI OF DS ds_name displays all DI’s related to the DS.

PAGE clause

controls output, providing a display formatted with page breaks.  By default, n (@LINES) is set to 24 when to the screen and 66 when to a file.

N - Output page size (@LINES) is set to n.  The minimum value for n is 7 because @TOP_MARGIN and @BOTTOM_MARGIN are set to 3.

TO FILE - No output is provided at the terminal. All output goes to the SF CATALOG.REP.

EXAMPLE

In this example, CATALOG displays all objects in a DBL named BOOKS.  The objects are sorted by object name within each DBL object type.

A DBL must be declared before entering the CATALOG command.

*USE DBL BOOKS<CR>
*CATALOG<CR>
CATALOG VERSION 5.01
Type  Name for DBL BOOKS
CF   SALES_DBM2
CM   QUICK_REP
CM   YTD_ORDERSS
CM   YTD_SALES
CS  CONVERT_DATE
DI  BOOKS_DBM2 DS BOOKS_DBM2
DI  DISCOUNTS_DBM2 DS DISCOUNTS_DBM2
DI  PUBLISHERS_DBM2 DS PUBLISHERS_DBM2
DI  ROYALTIES_DBM2 DS ROYALTIES_DBM2
DI  SALES_DBM2 DS SALES_DBM2
DI  STORES_DBM2 DS STORES_DBM2
DS  AUTHORS_DBM2 SD AUTHORS_DBM2
DS  BOOKS_DBM2 SD BOOKS_DBM2
DS  DISCOUNTS_DBM2 SD DISCOUNTS_DBM2
DS  PUBLISHERS_DBM2 SD PUBLISHERS_DBM2
Enter <CR> to continue

For long listings, the display stops after a page is scrolled up.  The full screen includes column headings and the continue prompt.  Pressing the Return key will allow the next page to be displayed.

Type  Name for DBL BOOKS
DS  ROYALTIES_DBM2 SD ROYALTIES_DBM2
DS  SALES_DBM2 SD SALES_DBM2
DS  STORES_DBM2 SD STORES_DBM2
PM  QUICK_REP
PM  UPDATE_SALES (No Text)
PM  YTD_SALES (Not SAVED)
SD  AUTHORS_DBM2
SD  BOOKS_DBM2
SD  DISCOUNTS_DBM2
SD  PUBLISHERS_DBM2
SD  ROYALTIES_DBM2
SD  SALES_DBM2
SD  STORES_DBM2

NOTES:  The clauses do not have to be specified in any order.  Most of them may be entered more than once.  Each clause has a help message to aid the user.  To display a list of available help messages, type a question mark after the utility command.

*CATALOG ?<CR>

To display a specific help message, specify the clause before the question mark.

*CATALOG clause ?<CR>

SEE ALSO:  DIRECTORY command, @LINES, @TOP_MARGIN, @BOTTOM_MARGIN