Use the CREATE function to define a root occurrence for a structure. In FILEMAINT Mode, there are only two structures, FILE and DATAVIEW. The root of a DATAVIEW structure is a DATAVIEW occurrence. Use the ADD function to define the base occurrence of a substructure, such as a RECORD occurrence for a RECORD substructure.
A dataview is comprised of elements or keys in the same table. You can use one or more elements or keys to define a dataview. When you define a dataview, list the elements in the order in which you want them to appear in a copybook.
Dataviews used by DL can be comprised of elements and keys. Define keys to the dataview if it is used for record-at-a-time processing. For details about how DL uses dataviews, see the Online COBOL/DL User Guide and the COBOL/DL Language Reference Guide.
Dataviews used by CA Ideal can be comprised of elements. You can include keys in the dataview definition, but CA Ideal ignores the keys when accessing data. CA Ideal searches for data according to the field specified in the "WHERE clause" of a program "FOR construct." Specify whether the CA Ideal dataview is used for updating functions and not for read-only functions. If the CA Ideal program is to use the dataview for updating functions, specify the value for the update attribute as Y (yes).
You cannot include the same FIELD occurrence in more than one ELEMENT occurrence defined to a DATAVIEW occurrence.
You cannot use a CA Ideal/PDL reserved word as the name of a DATAVIEW occurrence. For more information, see the reserved word list in the CA Ideal Application Development Reference Guide.
You must catalog a dataview using the CA Ideal CATALOG command before CA Ideal can use the dataview. For more information about cataloging dataviews, see the CA Ideal Administrator Guide.
You can define a DATAVIEW structure by using one of the following procedures:
When you select the CREATE function on the DATACOM/DB Structure Maintenance Panel for DATAVIEW Structure Functions, you receive the following prompter panel:
=> => => 1-DDOL000196A - CMPP - PLEASE COMPLETE REQUIRED INFORMATION FOR COMMAND ------------------------------------------------------------------------------ FILE Structure Maintenance TCCF CREATE DATAVIEW ________________________________ in STATUS ____ CRE DVW (name) STAT (status) with PASSWORD using LOCK 0 LIKE ________________________________ PSWD (pswd) LOC (lock) LIKE (name) ACCESSING ELEMENTS ACC (type) PF1=HELP PF2=END PF3=CLARIFY PF4=PROCESS PF5=MENU PF6=STATUS PF7=SCB PF8=SCF PF9=APPLY PF10=PATH PF11=NEXT PF12=INPUT
The following list describes each field, the valid entries, and the default (if one exists). Fields that require an entry are highlighted on your terminal. Fields which are not highlighted indicate that an entry is optional.
(Required) Specify the name for the DATAVIEW occurrence you are creating.
Note: CA Ideal does not allow DATAVIEW occurrence names up to 32 characters. See the person responsible for administering CA Ideal on your system for the maximum for your version of CA Ideal.
1- to 32-character name
(No default)
(Required) Specify the TEST status for the new occurrence. The status must match the status of the ELEMENT or KEY occurrences which are related to the dataview. For example, if you are creating a DATAVIEW occurrence which is related to an existing ELEMENT occurrence in T003 status, specify T003 status for the DATAVIEW occurrence.
T001—T999
(No default)
(Optional) Specify a password to protect this occurrence from unauthorized updates. For more information, see the section about protecting definitions in the CA Datacom Datadictionary User Guide.
1 to 4 alphanumeric characters
(No default)
(Optional) Specify a lock level to restrict access to this occurrence. See the section on protecting definitions in the CA Datacom Datadictionary User Guide.
0, 1, 2
0
(Optional) Specify the name of an existing DATAVIEW occurrence in the same status to use as the model for the occurrence you are creating.
Note: Any aliases or descriptors assigned to the existing occurrence are not duplicated for the new occurrence. You must define these separately.
1- to 32-character occurrence name
(No default)
(Optional) Specify the entity from which the dataview obtains information. The panel displays the default value, ELEMENTS. If you are relating keys to the dataview, use the Delete key to clear this field and type in KEYS.
ELEMENTS
KEYS
ELEMENTS
When you press Enter, CA Datacom Datadictionary displays the DATAVIEW Definition panel. Use the following descriptions to complete the attributes on this panel.
=> => => ------------------------------------------------------------------------------- FILE Structure Maintenance CREATE TUVU ............................ DATAVIEW ATTRIBUTES .............................. Name : EMP-HISTORY-DVW Status/Version: T001 Record: ______________________________ Update: _ .................. ELEMENTS accessed by the DATAVIEW .......................... Name ====== ============ T O P ============= 000001 ________________________________ ====== ========= B O T T O M ========== PF1=HELP PF2=END PF3=CLARIFY PF4=PROCESS PF5=MENU PF6=STATUS PF7=SCB PF8=SCF PF9=APPLY PF10=PATH PF11=NEXT PF12=INPUT
The following list describes each attribute, the valid entries, and the default (if one exists). Attributes that require an entry are highlighted on your terminal. Attributes which are not highlighted indicate that an entry is optional. If you do not assign a value to these attributes, they default to the value assigned in CA Datacom Datadictionary.
(Required) Specify the occurrence name of the RECORD containing the ELEMENT or KEY occurrences to be related to the DATAVIEW.
Occurrence name of an existing RECORD
(No default)
(Optional) Specify if CA Ideal is to use this DATAVIEW for updating functions with Y (yes). If a program uses the dataview for read-only functions, you can allow this attribute to default to N (no).
Y or N
N
The panel has one line to relate one element or key to the dataview. To insert additional lines on this panel:
(Required) If you are relating ELEMENT occurrences to the dataview specify the ELEMENT occurrence names. A FIELD occurrence cannot be contained in more than one element related to the dataview. If you are relating KEY occurrences to the dataview, specify the KEY occurrence names.
Note: Entries on this panel must be placed in the order in which you expect the data to be returned.
Existing ELEMENT or KEY occurrence name
(No default)
Press PF9 (APPLY) after completing your entries. If there are no errors, CA Datacom Datadictionary displays the DATAVIEW, the RECORD, and the ELEMENT (or KEY) occurrences in an indented structure format.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|