DISPLAY FIELD command: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
 
(9 intermediate revisions by 3 users not shown)
Line 34: Line 34:
<tr> <th><var>
<tr> <th><var>
<p>COMMA</p>
<p>COMMA</p>
</var></th> <td>If this is specified, a comma is used to separate the display of the field's attributes, and many of the strings of blanks between the attributes are collapsed to a single blank.  Since commas are already used with the <var>NOABBREV</var> option, this actually only has an effect when the <var>ABBREV</var> option is specified.
</var></th> <td>If this is specified, a comma is used to separate the display of the field's attributes, and many of the strings of blanks between the attributes are collapsed to a single blank.  Since commas are already used with the <var>NOABBREV</var> option, this actually only has an effect when the <var>ABBREV</var> option is specified. COMMA is available as of version 7.5 of Model 204.
   </td> </tr>
   </td> </tr>
   
   
Line 66: Line 66:
<tr>
<tr>
<th>fieldname</th>
<th>fieldname</th>
<td> is the name of an existing field in a <var class="product">Model&nbsp;204</var> file.</td>
<td>The name of an existing field in a <var class="product">Model&nbsp;204</var> file.</td>
</tr>
</tr>
   
   
Line 72: Line 72:


===Syntax notes===
===Syntax notes===
<p>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.</p>
<p>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.</p>
<p>Display options must be enclosed in parentheses and separated by commas or by one or more blanks. Field names must be separated by commas.</p>
<p>Display options must be enclosed in parentheses and separated by commas or by one or more blanks. Field names must be separated by commas.</p>
<p>For SORT, HASH, and RECORD SECURITY fields, the initialize commands are displayed first.</p>
<p>For SORT, HASH, and RECORD SECURITY fields, the initialize commands are displayed first.</p>
<p>When displaying PREALLOCATED fields, <var class="product">Model&nbsp;204</var> does not check the order in which the fields are displayed.</p>
<p>When displaying PREALLOCATED fields, <var class="product">Model&nbsp;204</var> does not check the order in which the fields are displayed.</p>
<p>To extract and store DDL statements, use DISPLAY FIELD (DDL) in conjunction with a USE data set.</p>
<p>To extract and store DDL statements, use DISPLAY FIELD (DDL) in conjunction with a USE data set.</p>
<p>You can reverse the default settings NOABBREV and NODDL but specifying CUSTOM=4 in the user's input stream, or via the RESET command. </p>
<p>You can reverse the default settings NOABBREV and NODDL by specifying CUSTOM=4 in the user's input stream, or via the RESET command. </p>


==Example==
==Example==
<p class="code">DISPLAY FIELD SSI
<p class="code"><b>DISPLAY FIELD SSI</b>
SSI
SSI
   (NON-DEFERRABLE, NON-FRV, NON-KEY, NON-CODED,
   (NON-DEFERRABLE, NON-FRV, NON-KEY, NON-CODED,
Line 87: Line 87:
   SPLITPCT 50, IMMED 1,  
   SPLITPCT 50, IMMED 1,  
   UNIQUE)
   UNIQUE)
<b>DISPLAY FIELD (ABBREV) SSI</b>  
<b>DISPLAY FIELD (ABBREV) SSI</b>  
SSI
SSI
   (NDEF NFRV NKEY    NCOD STR NNR VIS    UP ORD CHAR
   (NDEF NFRV NKEY    NCOD STR NNR VIS    UP ORD CHAR
   LRES 15  NRES    50  IMM  1  UNIQ)
   LRES 15  NRES    50  IMM  1  UNIQ)
<b>D FIELD (ABBREV COMMA) SSI</b>                                                                                 
<b>D FIELD (ABBREV COMMA) SSI</b>                                                                                 
SSI                                                                                                           
SSI                                                                                                           
   (NDEF, NFRV, NKEY, NCOD, STR, NNR, VIS, UP, ORD CHAR,
   (NDEF, NFRV, NKEY, NCOD, STR, NNR, VIS, UP, ORD CHAR,
   LRES 15, NRES  50, IMM  1,  UNIQ)
   LRES 15, NRES  50, IMM  1,  UNIQ)
<b>DISPLAY FIELD (ABBREV) ALL</b>  
<b>DISPLAY FIELD (ABBREV) ALL</b>  
ANNIVERSARY DATE
ANNIVERSARY DATE
Line 105: Line 108:
   (  DEF  FRV KEY MV  NCOD STR NNR  VIS
   (  DEF  FRV KEY MV  NCOD STR NNR  VIS
       UP      NORD)
       UP      NORD)
<b>DISPLAY FIELD (ABBREV) NAME -  
<b>DISPLAY FIELD (ABBREV) NAME -  
ANNIVERSARY DATE, POSITION</b>  
ANNIVERSARY DATE, POSITION</b>  
Line 116: Line 120:
   (  DEF  FRV  KEY MV NCOD STR NNR    VIS
   (  DEF  FRV  KEY MV NCOD STR NNR    VIS
       UP      NORD)  
       UP      NORD)  
DISPLAY FIELD (DDL) POLICYHOLDER  
 
<b>DISPLAY FIELD (DDL) POLICYHOLDER</b>
<b></b>*** DDL FOR FILE CLIENTS
<b></b>*** DDL FOR FILE CLIENTS
<b></b>*** DDL REQUEST DATE/TIME 91.255 SEP 12  09.34.26
<b></b>*** DDL REQUEST DATE/TIME 91.255 SEP 12  09.34.26
Line 133: Line 138:
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>
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>
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>
See [[DEFINE FIELD command]] for a complete list of field attributes and abbreviations. </p>


==Displaying CHUNK fields and CHUNK targets==
==Displaying OI chunk fields and OI 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 (OI) numeric range (ORDERED NUMERIC) fields by specifying "OI chunks" of data.  
<p>
<p>
DISPLAY FIELD on a CHUNK field indicates the CHUNK target for the CHUNK field:
DISPLAY FIELD on an OI chunk field indicates the OI chunk target for the field:
</p>
</p>
<p class="syntax"><span class="literal">DISPLAY FIELD</span> <span class="term">chunkFieldName</span>
<p class="syntax"><span class="literal">DISPLAY FIELD</span> <span class="term">chunkFieldName</span>
Line 149: Line 154:
</p>       
</p>       
<p>
<p>
The following examples show the different options of the DISPLAY FIELD command used on a CHUNK field:
The following examples show the different options of the DISPLAY FIELD command used on an OI chunk field:
</p>
</p>
<p class="syntax">IN QA00 DISPLAY FIELD DOBYYYY
<p class="syntax">IN QA00 DISPLAY FIELD DOBYYYY
Line 172: Line 177:
</p>
</p>
<p>
<p>
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:
If an OI chunk target is displayed and the DISPLAY FIELD options do NOT include NAMES, ABBREV, or DDL, then the corresponding OI chunk fields are listed in ascending order by OI chunk size:
</p>
</p>
<p class="syntax">IN QA00 D FIELD DOBYYYYMMDD  
<p class="syntax">IN QA00 D FIELD DOBYYYYMMDD  
Line 178: Line 183:
   (DEFERRABLE, NON-FRV, NON-KEY, NON-CODED, STRING, NON-RANGE, VISIBLE, UPDATE-IN PLACE,  
   (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,  
   ORDERED NUMERIC, LRESERVE 15, NRESERVE 15, SPLITPCT 50, IMMED  1, NON-UNIQUE,  
   EXACTLY-ONE, STORE-NULL NONE, LENGTH-EQ   8 CHUNKS(DOBYYYYMM,DOBYYYY))   
   EXACTLY-ONE, STORE-NULL NONE, LENGTH-EQ 8, CHUNKS(DOBYYYYMM,DOBYYYY))   
</p>
</p>


[[Category: General user commands]]
[[Category: User commands]]
[[Category:Commands]]
[[Category:Commands]]

Latest revision as of 16:19, 22 March 2017

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.

COMMA

If this is specified, a comma is used to separate the display of the field's attributes, and many of the strings of blanks between the attributes are collapsed to a single blank. Since commas are already used with the NOABBREV option, this actually only has an effect when the ABBREV option is specified. COMMA is available as of version 7.5 of Model 204.

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 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 by 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.

Displaying OI chunk fields and OI chunk targets

The CHUNK field attribute, available as of Model 204 version 7.5, enables more efficient searching on Ordered Index (OI) numeric range (ORDERED NUMERIC) fields by specifying "OI chunks" of data.

DISPLAY FIELD on an OI chunk field indicates the OI chunk target for the 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 an OI 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 an OI chunk target is displayed and the DISPLAY FIELD options do NOT include NAMES, ABBREV, or DDL, then the corresponding OI chunk fields are listed in ascending order by OI 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))