Skip to content
CA Datacom Tools - 15.0
Documentation powered by DocOps

Displaying the Dataview Definition

Last update March 9, 2017

To display a dataview definition, use the DISPLAY command or select option 1 on the Dataview Menu.

The following list contains information specific to each type of dataview.

An CA Datacom®/DB native or SQL dataview must be cataloged to CA Ideal™ for CA Datacom® before displaying.

  • For an unmodeled sequential or VSAM dataview, the catalog listing displays if the dataview definition was cataloged, otherwise the Field Definition displays.
  • For unmodeled sequential or VSAM dataviews, the Field Definition fill-in displays for browsing (to edit the dataview, use the EDIT command). You can then display the Identification, Parameter, and Keys fill-in panels by using the appropriate commands or PF keys.

This page contains the following topics:

Request Dataview Definition Display

You can display other dataview definition components by explicitly requesting them.

This command has the following format:

        {*                       }

DISPLAY {DATAVIEW dvw-identifier } [component]

* Represents the current dataview and can be substituted for the dataview identification phrase.

  • dvw-identifier 
    The name that identifies the dataview. The dvw-identifier includes different parts, depending on the type of dataview to identify:
    For SQL dataviews-Specify the dvw-identifier as:
    • authid.dvw-name
      authid (SQL only)-The one- to eight-character authorization ID required for SQL dataviews only.
      dvw-name-The 1- to 18-character name of the dataview.
    For CA Datacom®/DB native access, sequential, and VSAM dataviews-Specify the dvw-identifier as:
    • dvw-name [VERSION ver]
      dvw-name-The 1- to 18-character name of the dataview.
      ver-The version of the dataview. The specified version must be in test or production status. If you specify dvw-name and omit the version clause, the default version specified in the SET VERSION command is used. Valid versions are:
      Tnnn-The version number of a test dataview modeled in the dictionary (CA Datacom®/DB native command access and modeled sequential files only).
      T-Represents test status.
      PROD-The production status version of the dataview.
      nnn-The one- to three-digit version number assigned to a production dataview or an unmodeled dataview in test or production status.

      Note: Unmodeled dataviews created before CA Ideal™ for CA Datacom® r2.2 are recognized as version 1, PROD status.
  • component
    For unmodeled dataviews (sequential and VSAM files) only, one of the following or the equivalent PF key:
    IDENTIFICATION (PF6)-Displays the dataview identification definition fill-in.
    FIELD (PF5)-Displays the dataview field definition fill-in.
    PARAMETER (PF4)-Displays the dataview parameter definition fill-in.
    KEY (for VSAM dataviews only)-Displays the key definition fill-in.

Dataview Display

The dataview display is slightly different for each type of dataview. Each display starts with a Dataview Message Line, which indicates the type of file the dataview references and shows the date and time when the dataview was cataloged. After the Dataview Message Line, the field display begins with the dataview name shown as the level 1 name. Areas for special information that varies according to file type follow the field display. The following examples show dataview displays for different types of files.

For SQL Dataviews

The display output format for SQL dataviews is shown below. The sample is a dataview for a DB2 view. Notice the ROW ID and TEXT areas following the field display.

Commnd Seq Level Field name           T I Ch/Dg       K Value                 
====== ================================ T O P =================================
000001 CATALOGED 11/18/94 14:35      DB2                                      
000002   1 1     IDLSQLM.CUSTADDR                                             
000003   2  2     CUST_ID             X       5       K                       
000004   3  2     NAME                X      30                               
000005   4  2     ADDRESS             X      30                               
000006   5  2     CITY                X      15                               
000007   6  2     STATE               X       2                               
000008   7  2     ZIP                 X       9                               
000009   8  2     PHONE               X      10                               
000011 ROW ID(s):                                                             
000012   IDLSQLM.CUSTIX: CUST_ID                                              
000014 TEXT:                                                                  
000015 CREATE VIEW IDLSQLM.CUSTADDR                                           
000016             (CUST_ID,                                                  
000017              NAME,                                                     
000018              ADDRESS,                                                  
000019              CITY,                                                     
000020              STATE,                                                    
000021              ZIP,                                                      
000022              PHONE)                                                    
000023     AS SELECT                                                          
000024              CUST_ID,                                                  
000025              NAME,                                                     
000026              ADDRESS,                                                  
000027              CITY,                                                     
000028              STATE,                                                    
000029              ZIP,                                                      
000030              PHONE                                                     
000031     FROM IDLSQLM.CUSTOMERS                                             
====== ============================= B O T T O M ==============================

For Native Access Dataviews

The following screen shows the dataview display for an CA Datacom®/DB native access dataview.

Commnd Seq Level Field name           T I Ch/Dg Occur K Value/Redef/Dep on    
====== ================================ T O P =================================
000001 CATALOGED 02/10/94 10:12      DATACOM/DB UPD=YES DBID=001           
000002   1  1     EMPLOYEE                                                     
000003   2  2     NUMBER              U Z     5       K                       
000004   3  2     NAME                X      24                               
000005   4  2     STREET-ADDRESS      X      24                               
000006   5  2     CITY-ADDRESS        X      15                               
000007   6  2     STATE-ADDRESS       X       2                               
000008   7  2     ZIP-CODE-LOC        X       5       K                       
000009   8  2     SOCIAL-SECURITY     N P     9                               
====== ============================= B O T T O M ==============================

For VSAM Dataviews

The display output for VSAM dataviews is shown below. Notice the different dataview message at the top of the display and the key definitions shown at the bottom.

---- ---------  --------------------------------  -----------------------------
 Commnd Seq Level Field name           T I Ch/Dg Occur K Value/Redef/Dep on
 ====== ================================ T O P ===============================
 000002                               VAR LENGTH RECORD    MAX RECSIZE  0596
 000003   1 1     EMPMASTER
 000004   2  2     NAME                                K
 000005   3   3     LAST-NAME          X      20       P
 000006   4   3     FIRST-NAME         X      15
 000007   5   3     MID-INIT           X       1
 000008   6  2     EMP-ID              N Z     7       K
 000009   7  2     ADDRESS
 000010   8   3     STREET             X      20
 000011   9   3     CITY               X      15
 000021  19  2     DEPENDENTS
 000022  20   3     NUM-DEP            N Z     2
 000023  21   3     DEP-DATA                        12   DEP ON NUM-DEP
 000024  22    4     DEP-NAME
 000025  23     5     GIVEN            X      12
 000026  24     5     MIDDLE           X       1

 000032                           KEY SECTION
 000033 Seq File/Path  Field Name                        Unique  Upgrade Set
 000034 --- ---------  --------------------------------  ------  -------------
 000035  28 EMPMAST    NAME                               PRIMARY
 000036  29 EMPID      EMP-ID                            Y       Y
 ====== ============================= B O T T O M ============================

DATAVIEW Message Line

The Dataview Message Line is the first line (or two) in a dataview definition display. This message contains information about when the dataview was cataloged, the type of file the dataview references, and whether the file is updateable. The Dataview Message Line has a slightly different format for each type of dataview. In all cases, the date and time when the dataview was cataloged is indicated by mm/dd/yy hh:mm.

For SQL Dataviews

The format of the Dataview Message Line for SQL dataviews is:

CATALOGED mm/dd/yy hh:mm       database-type

The second line shows the dataview name (the level 1 identifier).

For Native Command Access

For CA Datacom®/DB native access dataviews, the format of the Dataview Message Line is:

For z/OS

CATALOGED mm/dd/yy hh:mm      DATACOM/DB    UPD=xxx   DBID=xxx


CATALOGED mm/dd/yy hh:mm      DATACOM/DB    UPD=xxx   DBID=xxx

          DEVICE=             MAX-REC-SIZE=    MAX-BLK-SIZE=

For Sequential Files

For sequential dataviews, the format of the Dataview Message Line is the same for both modeled and unmodeled dataviews since, after the dataview is cataloged, there is no real difference in the object of modeled and unmodeled dataviews.

For z/OS

CATALOGED mm/dd/yy hh:mm      SEQUENTIAL UPD=xxx FILENAME xxxxxxx



CATALOGED mm/dd/yy hh:mm      SEQUENTIAL UPD=xx FILENAME xxxxxxx

          DEVICE=             MAX-REC-SIZE=       MAX-BLK-SIZE=

For VSAM Files

For VSAM dataviews, the Dataview Message Line shows the type of VSAM file, the maximum record size, and the name of the file. The format of the Dataview Message Line for VSAM files is:

For Fixed-length Files

CATALOGED mm/dd/yy hh:mm   VSAM  type UPD=xxx FILENAME xxxxxxx

                           FIXED LENGTH RECORD      RECSIZE  xxxx

For Variable-occurrence Files

CATALOGED mm/dd/yy hh:mm     VSAM  type UPD=xxx FILENAME xxxxxxx

                             VAR OCCURRENCE RECORD    MAX RECSIZE  xxxx

For Variable-segment Files

CATALOGED mm/dd/yy hh:mm     VSAM  type UPD=xxx FILENAME xxxxxxx

                             VAR SEGMENT RECORD   MAX RECSIZE  xxxx

Note: For RRDS files defined with variable-segment records, the second line of the dataview display shows only the record size since RRDS records are always written as fixed-length records.

Dataview Field Display

The remaining components of the formatted dataview definition display are as follows:

  • Command An area where you can specify line commands. Line commands can copy, move, or delete lines. 
  • Seq A sequence number assigned to each name on the dataview display for reference.
  • Level The level number that ranks columns in hierarchical order, from 2 through 16. The dataview name is always assigned as level 1.
  • Field name The name of an elementary (simple) or group (compound) field. If this is a dataview for SQL access, this is the name of a column. A semicolon (;) as the last character indicates that the name is continued on the next line.
  • T (type) The field or column type. Possible field types are:
    • Alphanumeric (character). Valid for all dataview types.
    • Numeric (signed). For unmodeled files (VSAM and sequential) and CA Datacom®/DB native access dataviews, numeric fields can be zoned, packed, or binary. For SQL access, numeric fields can be integer, small integer, and decimal.
  • Unsigned numeric. For unmodeled files (VSAM and sequential) and CA Datacom®/DB native access dataviews, unsigned numeric fields can be zoned or packed. For SQL access, unsigned numeric fields can be integer, small integer, and decimal.
  • Date. For unmodeled files (VSAM and sequential) and CA Datacom®/DB native access dataviews, date fields can be zoned, packed, or binary. For SQL access, this form of date field not valid, see the SQL DATE, TIME and TIMESTAMP columns.
  • A condition name assigned to a specific value. This is not valid for SQL access dataviews.
  • Variable length (variable string and long variable string). This is valid only for SQL access and CA Datacom®/DB native access dataviews. For CA Datacom®/DB native access to SQL-defined objects, variable length fields are supported, but they display as an X type field and the length shown is the maximum length.
    For each variable length item in an SQL dataview, a two-byte long field for the length is generated in front of the data. This field is not shown in the display. The programmer needs to account for this field only in non-CA Ideal™ for CA Datacom® subprograms. 
  • (Internal Type) The internal representation of numeric (signed and unsigned) and date type fields:
    • Packed
    • Zoned
    • Binary
    Numeric fields can be internally represented in packed decimal, zoned decimal, or binary formats. CA Ideal™ for CA Datacom® can operate on most of these directly, performing internal conversions when necessary (floating point formats are not supported). Numeric fields are viewed in terms of decimal (base 10) digits and are fully defined by the total number of integer and decimal places, regardless of internal storage formats. CA Ideal™ for CA Datacom® performs all necessary internal conversions on both input and output.
    The CA Ideal™ for CA Datacom® format for DB2 numeric columns is shown under the CH/DG entry.
  • Ch/Dg (Characters/Digits) The length of the field:
    • Characters-The number of alphanumeric characters in the field.
    • Digits-The number of integer and decimal places (base 10 equivalent) in a numeric field, separated by a period.
    The following example shows the type, internal type, and ChDg values for 5 fields.
Type (Type) I (Internal Type) Ch/Dg (Characters/digits)
X   42
X   16
N P 7
N Z 10.3
D P 5 (not valid for SQL access)

In the above example, 42 in the Ch/Dg column for the first alphanumeric field (Type X) indicates a length of 42 characters; and 16 for the next alphanumeric field indicates a length of 16 characters. A numeric field (Type N) with 7 specified in the Ch/Dg column indicates a seven-digit field able to hold seven integer places. Since the internal type is P (packed), the actual size of the field is four bytes ((7 1)/2 = 4). The next numeric field, with 10.3 specified in the Ch/Dg column, indicates a 13-digit field able to hold ten integer places and three decimal places. Since the internal type is Z (zoned), the actual size of the field is 13 bytes. A date field (Type D) with 5 specified in the Ch/Dg column can hold an internal 5-integer date value of up to 273 years from the base year.

SQL numeric fields display as follows:

  T (Type) I (Internal Type) Ch/Dg (Characters/digits)
INTEGER fields N B 9
SMALLINT fields N B 4
DECIMAL fields N P actual length
NUMERIC fields N Z actual length

SQL date and time fields display with a comment and the following attributes:

  T (Type) Ch/Dg (Characters/digits)
DATE fields X 10
TIME fields X 8
TIMESTAMP fields X 26

A field with an unsupported data type displays as type X and a warning message is issued.

  • Occur (Number of occurrences)-Not present for SQL access dataviews. The number of times a group or field repeats.
    If a number displays in this column (and there is no DEP ON clause in the Value/Redef/Dep on column), it represents the number of times an item (group or elementary field) that repeats a fixed number of times, occurs.
    An item (group or elementary field) can also occur a variable number of times. In this case, the Occur column value represents the maximum number of occurrences, and a DEP ON clause appears in the Value/Redef/Dep on column. The DEP ON (Depending on) field name is specified in the Value/Redef/Dep on column with the clause DEP ON field-name.
    The Depending on field is a non-repeating elementary numeric field with no decimal positions that is located in this dataview preceding the DEP ON clause. At runtime, the Depending on field specifies the actual number of occurrences at any point during the run.
  • K (Key)-(CA Datacom®/DB native access and SQL access) The key column that indicates whether a field is defined as a key or part of a key in the dataview.
    • The field is a full key
    • The field is a partial key (high order portion of a key)

    If the field is not a full or partial key, there is no entry in this column.
    For example, in a dataview where KEY1 consists of FIELD1 and KEY2 consists of FIELD2,FIELD3, the corresponding dataview display identifies the three fields as follows:

    FIELD1  K  (full key)
    FIELD2  P  (partial key)
    FIELD3   (no entry)

    Since only the high order portion of a multi-field key can be a partial key, FIELD3 is not a partial key.
    If a key has 65 or more FIELDs defined in the dictionary, CA Ideal™ for CA Datacom® only recognizes the first 64 FIELDs, and lists only the first as a partial key.

  • K (Key) (VSAM only)-Indicates whether the field is a primary or alternate key. If the field is not a primary or alternate key, there is no value in this column:
    • The field defined as a primary or alternate key.
    • P The first field in a group that is defined as a key.
    All of the keys, primary and alternate, are listed at the end of the field layout.
  • Value/Redef/Dep on (Value, Redefinition, or Depending on column-name)-An initial value for a condition name or for an elementary field, a field redefinition clause, a DEP ON clause, or a comment.
    • Value-An initial default value assigned to this field each time a new record is created. The DVW Administrator specifies it during dataview definition. If no initial value is specified, CA Ideal™ for CA Datacom® uses spaces for alphanumeric, 0 for numeric. The default value is a numeric or alphanumeric literal, depending on the type of elementary field. Alphanumeric literals are enclosed in delimiters (“or”).
    Note: For read-only (R) dataviews (UPDATE-INTENT=N), only condition name (Type C) values display since initial value has no meaning for a read-only dataview.
  • WITH IND (For SQL and CA Datacom®/DB Native 
    Access)-The clause WITH IND in this column indicates that this column is nullable; that is, it can receive null values.

    Note: For each nullable item, CA Ideal™ for CA Datacom® generates a two-byte indicator variable. This variable is not shown in the display. The programmer needs to account for this field only in non-CA Ideal™ for CA Datacom® subprograms.
  • :DATE or :TIME or :TIMESTAMP-For SQL and CA Datacom®/DB native access. An indicator of an SQL date, time, or timestamp column that has been converted to an alphanumeric item by CA Ideal™ for CA Datacom®.
  • Comments-For unmodeled sequential and VSAM files, comments provide useful information about the field. A comment is indicated in this column by a preceding colon (:).
  • KEY SECTION-For VSAM files only, lists the key definitions entered on the Key Definition fill-in:
    • File/Path-The file name of the base cluster for the primary key or of the path for any alternate keys.
    • Field Name-The name of the key field.
    • Unique-For the primary key, the word PRIMARY displays. For alternate keys, a Y indicates that the key is a unique key; N indicates that it is not unique.
    • Upgrade Set-For the primary key, this column is blank. For alternate keys, a Y indicates that this path is part of the upgrade set; N indicates that it is not.
  • Row IDs (SQL access only)-The names of any unique indexes (composed of up to 64 non-nullable columns) defined for the underlying table or view for the dataview, and the names of the columns comprising each index.
  • Text (SQL access only)-The text of the SQL CREATE VIEW statement, used if the dataview is associated with a view. If the dataview is for an CA Datacom® SQL access synonym, the Text area indicates the object for which this is a synonym.
Was this helpful?

Please log in to post comments.