This chapter describes how to create and maintain CA Ideal dataview definitions for VSAM files. Dataviews for CA Datacom/DB/DB CBS access, SQL access, and sequential files are described in other chapters of this guide.
Note: To create and maintain CA Ideal dataview definitions for VSAM files, your site must have the CA Ideal VSAM support option installed.
CA Ideal supports dataviews for all three types of VSAM files:
The record length in a VSAM file can vary in two ways:
=> => => ------------------------------------------------------------------------------- DVWL : DISPLAY DATAVIEW DVW VSAM-VAR-ODO (001) TEST SYS: $ID DISPLAY Commnd Seq Level Field name T I Ch/Dg Occur K Value/Redef/Dep on ====== ================================ T O P ================================= 000001 CATALOGED 03/06/06 13:06 VSAM KSDS UPD=YES FILENAME VSAMDVW 000002 VAR OCCURENCE RECORD MAX RECSIZE= 0512 000003 1 1 VSAM-VAR-ODO 000004 2 2 HEADER 000005 3 3 KEY-FIELD X 10 K 000006 4 3 VAR-COUNT N P 3 000007 5 2 REPEAT-SECTION 100 DEP ON VAR-COUNT 000008 6 3 FIELD-1 X 3 000009 7 3 FIELD-2 N B 4 000010 000011 000012 KEY SECTION 000013 Seq File/Path Field Name Unique Upgrade Set 000014 --- --------- -------------------------------- ------ ----------- 000015 8 VSAMDVW KEY-FIELD PRIMARY ====== ============================= B O T T O M ==============================
Variable‑segment records include different fields, based on a record type that is usually included in a fixed portion of the record. The varying sets of fields (segments) are defined using the REDEFINES clause to establish different level‑2 field descriptions that overlap each other. These varying segments can be different lengths, but the longest segment must be the first variable segment defined. A variable‑segment record cannot also contain variably repeating fields.
=> => => ------------------------------------------------------------------------------- DVWL : DISPLAY DATAVIEW DVW VSAM-VAR-SEG (001) TEST SYS: $ID DISPLAY Commnd Seq Level Field name T I Ch/Dg Occur K Value/Redef/Dep on ====== ================================ T O P ================================= 000001 CATALOGED 03/06/06 13:11 VSAM KSDS UPD=YES FILENAME VSAMDVW 000002 VAR SEGMENT RECORD MAX RECSIZE= 0033 000003 1 1 VSAM-VAR-SEG 000004 2 2 HEADER 000005 3 3 KEY-FIELD X 10 K 000006 4 3 RECORD-TYPE X 1 000007 5 TYPE-A C 'A' 000008 6 TYPE-B C 'B' 000009 7 TYEP-C C 'C' 000010 8 2 REC-TYPE-A 000011 9 3 FIELD-1 X 20 000012 10 3 FIELD-2 N B 4 000013 11 2 REC-TYPE-B REDEF REC-TYPE-A 000014 12 3 FIELD-X N P 7.2 000015 13 3 FIELD-Y X 4 000016 14 2 REC-TYPE-C REDEF REC-TYPE-A 000017 15 3 FIELD-P X 12 000018 16 3 FIELD-Q N B 4 000019 17 3 FIELD-R N B 4 000020 000021 000022 KEY SECTION 000023 Seq File/Path Field Name Unique Upgrade Set 000024 --- --------- -------------------------------- ------ ----------- 000025 18 VSAMDVW KEY-FIELD PRIMARY ====== ============================= B O T T O M ==============================
KSDS files require a fixed‑length segment, since the keys must always be in the same position in the record.
ESDS files are not required to have a fixed‑length segment. If an ESDS file does not have a fixed‑length segment, you can determine the record type from the length using the function $REC‑LENGTH. For more information about $REC‑LENGTH function, see the Command Reference Guide.
For RRDS files, variable‑occurrence records are not supported (by VSAM). Variable‑segment records are accommodated to allow the use of multiple record types; however, the records are padded with binary zeros, as necessary, to create fixed‑length records.
VSAM dataviews are created and defined in CA Ideal. They are not modeled in the dictionary facility.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|