DISPLAY FIELD command: Difference between revisions

From m204wiki
Jump to navigation Jump to search
Line 115: Line 115:
</p>
</p>
==Usage notes==
==Usage notes==
<p>The DISPLAY FIELD command displays the description of a field in the <var class="product">Model&nbsp;204</var> file that is open. This includes fields that have been defined but do not actually appear in any records. Fields are listed in the format specified by the display options (definitions, names only, or abbreviations). The NAMES display option is used generally in conjunction with ALL.</p>
<p>
<p><var class="product">Model&nbsp;204</var> sorts the output of the DISPLAY FIELD command by field name whenever ALL is specified. Specifying specific field names in the name list of the DISPLAY command generates output in the order in which the field names appear in the name list.</p>
The DISPLAY FIELD command displays the description of a field in the <var class="product">Model&nbsp;204</var> file that is open. This includes fields that have been defined but do not actually appear in any records. Fields are listed in the format specified by the display options (definitions, names only, or abbreviations). The NAMES display option is used generally in conjunction with ALL.</p>
<p>The ABBREV display option uses abbreviations for the field attributes (for example, STR for STRING). If ABBREV is not specified, full attribute names are displayed. Only applicable field attributes are displayed. For example, if a field is listed as either CODED or FRV, then MANY-VALUED or FEW-VALUED is also listed. However, if the field is both NON-CODED and NON-FRV, MANY-VALUED and FEW-VALUED do not apply and neither is listed.</p>
<p>
<p>A complete list of field attributes and abbreviations is included in [[DEFINE FIELD command|DEFINE FIELD: Field names and attributes]]. For detailed information on field attributes, refer to the <var class="product">Model&nbsp;204</var> File Manager's Guide.</p>
<var class="product">Model&nbsp;204</var> sorts the output of the DISPLAY FIELD command by field name whenever ALL is specified. Specifying specific field names in the name list of the DISPLAY command generates output in the order in which the field names appear in the name list.</p>
<p>
The ABBREV display option uses abbreviations for the field attributes (for example, STR for STRING). If ABBREV is not specified, full attribute names are displayed. Only applicable field attributes are displayed. For example, if a field is listed as either CODED or FRV, then MANY-VALUED or FEW-VALUED is also listed. However, if the field is both NON-CODED and NON-FRV, MANY-VALUED and FEW-VALUED do not apply and neither is listed.</p>
<p>
See [[DEFINE FIELD command]] for a complete list of field attributes and abbreviations. For detailed information on field attributes, refer to the <var class="product">Model&nbsp;204</var> File Manager's Guide.</p>
 
[[Category: General user commands]]
[[Category: General user commands]]
[[Category:Commands]]
[[Category:Commands]]

Revision as of 00:53, 7 March 2013

Summary

Privileges
Any user
Function
Displays the definition of a field in a Model 204 file

Syntax

DISPLAY FIELD [(display-option [,display-option])] {ALL | fieldname [,fieldname]...}

Where:

display-option One of the following:

Option

Displays...

ABBREV

NOABBREV

Name and description of the field in abbreviated form.

NOABBREV is the default.

DDL

NODDL

Model 204 data definition language statements needed to rebuild a file.

NODDL is the default.

DEFINITIONS

Name and description of the field; this is the default.

NAMES

Name (only) of the field.

NOUSE

Field output on your terminal, even if a USE command precedes the DISPLAY. Any alternate device remains open, but is not used.

fieldname is the name of an existing field in a Model 204 file.

Syntax notes

Only one of the display options DEFINITIONS, NAMES, or ABBREV can be specified. DDL and NOUSE can be specified with any of these options. However, if you specify DISPLAY FIELD (DDL, NAMES) the NAMES option is ignored.

Display options must be enclosed in parentheses and separated by commas or by one or more blanks. Field names must be separated by commas.

For SORT, HASH, and RECORD SECURITY fields, the initialize commands are displayed first.

When displaying PREALLOCATED fields, Model 204 does not check the order in which the fields are displayed.

To extract and store DDL statements, use DISPLAY FIELD (DDL) in conjunction with a USE data set.

You can reverse the default settings NOABBREV and NODDL but specifying CUSTOM=4 in the user's input stream, or via the RESET command.

Example

DISPLAY FIELD SSI SSI (NON-DEFERRABLE, NON-FRV, NON-KEY, NON-CODED, STRING, NON-RANGE, VISIBLE, UPDATE IN PLACE, ORDERED CHARACTER, LRESERVE 15, NRESERVE 15, SPLITPCT 50, IMMED 1, UNIQUE) DISPLAY FIELD (ABBREV) SSI SSI (NDEF NFRV NKEY NCOD STR NNR VIS UP ORD CHAR LRES 15 NRES 50 IMM 1 UNIQ) DISPLAY FIELD (ABBREV) ALL ANNIVERSARY DATE ( DEF NFRV KEY NCOD STR NR VIS UP NORD) NAME ( DEF NFRV KEY NCOD STR NNR VIS UP NORD) POSITION ( DEF FRV KEY MV NCOD STR NNR VIS UP NORD) DISPLAY FIELD (ABBREV) NAME - ANNIVERSARY DATE, POSITION NAME ( DEF NFRV KEY NCOD STR NNR VIS UP NORD) ANNIVERSARY DATE ( DEF NFRV KEY NCOD STR NR VIS UP NORD) POSITION ( DEF FRV KEY MV NCOD STR NNR VIS UP NORD) DISPLAY FIELD (DDL) POLICYHOLDER *** DDL FOR FILE CLIENTS *** DDL REQUEST DATE/TIME 91.255 SEP 12 09.34.26 DEFINE FIELD POLICYHOLDER - (NON-FRV,NON-KEY,NON-CODED,STRING,NON-RANGE, - VISIBLE,UPDATE IN PLACE,NON-ORDERED,NON-UNIQUE, - REPEATABLE)

Usage notes

The DISPLAY FIELD command displays the description of a field in the Model 204 file that is open. This includes fields that have been defined but do not actually appear in any records. Fields are listed in the format specified by the display options (definitions, names only, or abbreviations). The NAMES display option is used generally in conjunction with ALL.

Model 204 sorts the output of the DISPLAY FIELD command by field name whenever ALL is specified. Specifying specific field names in the name list of the DISPLAY command generates output in the order in which the field names appear in the name list.

The ABBREV display option uses abbreviations for the field attributes (for example, STR for STRING). If ABBREV is not specified, full attribute names are displayed. Only applicable field attributes are displayed. For example, if a field is listed as either CODED or FRV, then MANY-VALUED or FEW-VALUED is also listed. However, if the field is both NON-CODED and NON-FRV, MANY-VALUED and FEW-VALUED do not apply and neither is listed.

See DEFINE FIELD command for a complete list of field attributes and abbreviations. For detailed information on field attributes, refer to the Model 204 File Manager's Guide.