Defining Default Output Specifications

The preceding sections described how dictionaries define the structure of the data that appears in INFO/ACCESS reports. Dictionaries also affect the contents of these reports by defining default output specifications. These specifications determine which attributes are automatically displayed when an INFO/ACCESS query does not specify the names of any Attribute Definition items.

Unless the default is explicitly redefined, the default output for a file consists of item-IDs only. Thus, entering the following query produces a list of the item-IDs in the CUSTOMERS file:

>LIST CUSTOMERS

 

PAGE   1                                        10:33:54  23 MAY 1993

 

CUSTOMERS

 

HJENK7129

JBOHA5422

JBROW6749

JBUCK6488

BLEAR6803

JMASO6378

AORLA5993

SPIRS5289

MASHX5777

AEDWA5224

JPEER5993

RPIER5539

AJOHN5396

HJOHN7265

HHIGG6849

DEDGE6635

AMEAD5619

BLAMP6196

 

18 ITEMS LISTED.

>

The default output specifications for the CUSTOMERS data file can be defined by performing any of the following operations in the CUSTOMERS dictionary:

A phrase is a dictionary item that consists of any parameters from an INFO/ACCESS query except for a command or a file name.

If all three of these methods are implemented in the CUSTOMERS dictionary, the system treats them in the preceding order. In all cases, the default output specifications take effect only if an INFO/ACCESS query does not include the names of any Attribute Definition items.

Creating an @LPTR Phrase

Creating a phrase in the CUSTOMERS dictionary whose item-ID is @LPTR defines the default output specifications for reports sent to the printer. Once an @LPTR phrase is defined, any INFO/ACCESS statement that contains the LPTR modifier or its equivalent, the P option, and does not specify an output specification, displays the attributes named in the @LPTR phrase. For example, the following @LPTR phrase specifies customer’s first and last names, city, and state:

@LPTR

001 I

002 FIRST-NAME LAST-NAME

003 CITY STATE

A definition code of I defines this file item as a phrase. When the following query is entered:

>LIST CUSTOMERS LPTR

the results are the same as

>LIST CUSTOMERS FIRST-NAME LAST-NAME CITY STATE LPTR

Remember that on 132-column wide printers, you can create a wider report to show more information than what typically fits on a terminal display screen.

Creating an @ Phrase

Creating a phrase in the CUSTOMERS dictionary whose item-ID is @ defines the default output specifications for reports. These output specifications are used for reports sent to the terminal screen, or for reports sent to the printer, if there is no @LPTR phrase. For example, you can define the following @ phrase in the CUSTOMERS dictionary:

@

001 I

002 FIRST-NAME LAST-NAME

003 CITY STATE

Creating Dictionary Items in Numeric Sequence

The dictionary contains a sequence of numeric item-IDs in consecutive order beginning with 1. The system uses these items to define the default output specifications. Each item in the sequence must contain an A or S code in Attribute 1.

If an Attribute Definition item in a numeric sequence contains an X instead of an A in Attribute 1, the data is not part of the default output specifications. The data for items that follow this X item in the numeric sequence are included in the report.

For example, the same Attribute Definition items 1-4 can be created in the CUSTOMERS dictionary, except that Attribute 1 of item 3 (CITY) contains an X. In this case, the default output specifications include the data defined only by items 1, 2, and 4 (FIRST-NAME, LAST-NAME, and STATE).

See Also

Extracting Information