Using IDCAMS To Manage VSAM Data Sets: Session 12998 Presented by Michael E. Friske
Using IDCAMS To Manage VSAM Data Sets: Session 12998 Presented by Michael E. Friske
Sets
Session 12998
Presented by
Michael E. Friske
IDCAMS Manual
The IDCAMS commands can be found in the DFSMS
Access Method Services (AMS) for Catalogs manual. This
manual is available on the IBM publications web site.
Invoking IDCAMS
Environments IDCAMS can be used in
Batch
TSO
Call within a program
EXPORT
IMPORT
REPRO
LISTCAT
PRINT
VERIFY
Cluster
Data Component
Index Component
Any of the above
DATACLAS(EXTAVSAM)
INDEXED KEY(9,0)
CYLINDERS(500,50)
FREESPACE(10,0)
RECORDSIZE(150,150)
SHAREOPTIONS(2,3)
SPEED)
DATA(CONTROLINTERVALSIZE(4096))
INDEX(CONTROLINTERVALSIZE(2048))
VOLUMES
Specify an * for each volume required for SMS managed
data sets
INDEXED
NONINDEXED
NUMBERED
LINEAR
- KSDS
- ESDS
- RRDS
- LDS
CONTROLINTERVALSIZE
For NONSPANNED, the CI size must be at least 7 bytes
larger than the max record size
CI size can be 512 to 8192 bytes in 512 byte increments
or 8KB to 32KB in 2KB increments
For Linear data sets, the CI size can be 4096 to 32768 in
4096 increments
VSAM will adjust if a valid size is not specified
Usually different sizes for DATA and INDEX component
FREESPACE(CI% CA%)
Disk
Utilization (%)
Non-EF
45
61
72
78
79
83
84
89
83
83
92
89
84
91
83
89
93
89
90
89
100
91
90
89
96
90
93
87
CI/CA
Extended
Format
720
495
375
315
255
225
195
180
150
135
135
120
105
105
90
90
75
60
45
45
40
37
33
30
30
22
25
22
Disk
Utilization
(%)Extended
Format
46
63
72
81
82
87
88
92
87
87
95
92
88
94
87
92
96
92
81
92
88
95
93
92
100
81
86
92
FREESPACE(25 20)
Control Area
Control Area
102
103
108
143
144
145
113
115
124
146
149
151
127
129
130
152
154
155
131
139
141
157
158
159
DEFINE ALTERNATEINDEX
This command is used to create an alternate index over
a KSDS or an ESDS
The KEY parameter specifies the key length and the
offset where the key begins in the data record
Most parameters for an alternate index are the same as
the parameters for a KSDS
An alternate index can be define with UPGRADE or
NOUPGRADE
The AIX can be defined with either UNIQUEKEY or
NONUNIQUEKEY
BLDINDEX Command
The BLDINDEX command loads the alternate index
If the AIX is defined with NONUNIQUEKEY, the CISIZE
for the AIX needs to be large enough to contain pointers
to all of the records for each alternate index key
ALTER Command
The ALTER command is used to change the logical
characteristics of a VSAM data set
The physical characteristics of a VSAM data set cannot
be changed with the ALTER command
The ALTER command is used to rename VSAM data
sets and their associated components
DELETE Command
The DELETE command can be used to VSAM base
clusters, alternate indexes, and path definitions
When an alternate index is deleted, the associated path
is also deleted
When a base cluster is deleted, all of the associated
alternate indexes and paths are also deleted
EXPORT Command
The EXPORT command can be used to create a backup
of a VSAM data set
The backup data set is in a proprietary format that can only
be used by the IMPORT command
EXPORT Examples
//STEP010 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//DDNAME1 DD DSN=PROD.EXPORT.PAYROLL.MASTER(+1),
//
DISP=(NEW,CATLG,DELETE),
//
SPACE=(CYL,(500,50),RLSE)
//SYSIN DD *
EXPORT PROD.PAYROLL.MASTER OUTFILE(DDNAME1) PERMANENT
IMPORT Command
The IMPORT command recovers the data for a VSAM
data set from an EXPORT backup
REPRO Command
The REPRO command can be used to copy some or all of
the records from a VSAM data set to either another VSAM
data set or a sequential data set
The REPRO command can also be used to copy records
from a sequential data set into a VSAM data set
PRINT Command
The PRINT command can be used to print records in a
VSAM data set
VERIFY Command
The VERIFY command is used to correctly reflect the end
of the VSAM data set that was not closed properly
The RECOVER parameter can be specified to fix errors
caused by an incomplete CA reclaim
LISTCAT ENTRIES(PAYROLL.PROD.ACTIVE)
LISTCAT LEVEL(QA.BALANCE)
LISTCAT LEVEL(ACCT.PROD.GRP%N)
LISTCAT ENT(HR.PROD.EMPLID) ALL OUTFILE(OUTDD)