DISPLAY FIELD command: Difference between revisions
Line 135: | Line 135: | ||
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 204</var> File Manager's Guide.</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 204</var> File Manager's Guide.</p> | ||
==DISPLAY FIELD for chunk fields and chunk targets== | |||
The [[DEFINE_FIELD_command#CHUNK_attribute|CHUNK field attribute]], available as of Model 204 version 7.5, enables more efficient searching on ordered index numeric range (ORDERED NUMERIC) fields by specifying data "chunks." | The [[DEFINE_FIELD_command#CHUNK_attribute|CHUNK field attribute]], available as of Model 204 version 7.5, enables more efficient searching on ordered index numeric range (ORDERED NUMERIC) fields by specifying data "chunks." | ||
<p> | <p> |
Revision as of 19:23, 21 August 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:
|
||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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) D FIELD (ABBREV COMMA) 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.
DISPLAY FIELD for chunk fields and chunk targets
The CHUNK field attribute, available as of Model 204 version 7.5, enables more efficient searching on ordered index numeric range (ORDERED NUMERIC) fields by specifying data "chunks."
DISPLAY FIELD on a chunk field indicates the chunk target for the chunk field:
DISPLAY FIELD chunkFieldName
displays:
chunkFieldName (CHUNK chunkSize FOR chunkTargetFieldName [, attribute]...)
The following examples show the different options of the DISPLAY field command used on a chunk field:
IN QA00 DISPLAY FIELD DOBYYYY DOBYYYY (DEFERRABLE, NON-FRV, NON-KEY, NON-CODED, STRING, NON-RANGE, INVISIBLE, ORDERED NUMERIC, LRESERVE 15, NRESERVE 15, SPLITPCT 50, IMMED 1, NON-UNIQUE, REPEATABLE, CHUNK 10000 FOR DOBYYYYMMDD) IN QA00 DISPLAY FIELD (ABBREV) DOBYYYY DOBYYYY (DEF NFRV NKEY NCOD STR NNR INV ORD NUM LRES 15 NRES 15 SPLT 50 IMM 1 NUNIQ REPT CNK 10000 FOR DOBYYYYMMDD) IN QA00 DISPLAY FIELD (DDL) DOBYYYY *** DDL FOR FILE QA00 *** DDL REQUEST DATE/TIME: 13.147 MAY 27 10.21.58 DEFINE FIELD DOBYYYY - (DEFERRABLE, NON-FRV, NON-KEY, NON-CODED, STRING, NON-RANGE, INVISIBLE, ORDERED NUMERIC, LRESERVE 15, NRESERVE 15, SPLITPCT 50, IMMED 1, NON-UNIQUE, REPEATABLE, CHUNK 10000 FOR DOBYYYYMMDD)
If a chunk target is displayed and the DISPLAY FIELD options do NOT include NAME, ABBEV or DDL, then the corresponding chunk fields are listed in ascending order by chunk size:
IN QA00 D FIELD DOBYYYYMMDD DOBYYYYMMDD (DEFERRABLE, NON-FRV, NON-KEY, NON-CODED, STRING, NON-RANGE, VISIBLE, UPDATE-IN PLACE, ORDERED NUMERIC, LRESERVE 15, NRESERVE 15, SPLITPCT 50, IMMED 1, NON-UNIQUE, EXACTLY-ONE, STORE-NULL NONE, LENGTH-EQ 8 CHUNKS(DOBYYYYMM,DOBYYYY))