Define Fixed-length RRDS
Define Fixed-length RRDS Example
Scenario - Create RRDS with fixed-length records of size 47 bytes.
JCL -
----+----1----+----2----+----3----+----4----+----5
//MATEPKE JOB (123),'MTH',CLASS=A,
// MSGCLASS=A,
// MSGLEVEL=(1,1),
// NOTIFY=&SYSUID
//*********************************************
//* DEFINE VSAM FIXED LENGTH RRDS
//*********************************************
//STEP01 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE CLUSTER -
(NAME(MATEGJ.TEST.RRDS) -
RECORDSIZE(47,47) -
CYLINDERS(2,1) -
VOLUMES(DEVHD4) -
NUMBERED -
REUSE ) -
DATA(NAME(MATEGJ.TEST.RRDS.DATA))
/*
Output -
Once the above JCL is submitted, check the MAXCC of the job for any errors. If the MAXCC is 00 or 04, KSDS successfully created.
Verify the RRDS in 3.4 (Dataset List utility) or any File management tools for the existance.
Explaining Example -
In the above example,
- RECORDSIZE(47,47) specifies that the record average length is 47, and the maximum length is 47. So the RRDS file we are creating is fixed-length.
- CYLINDERS(2,1) specifies the primary memory allocation is 2 CYLINDERS, and secondary memory allocation is 1 CYLINDER.
- VOLUMES(DEVHD4) specifies that allocate the RRDS on volume DEVHD4.
- NUMBERED parameter specifies the file is to create RRDS.
- REUSE specifies the memory can reuse immediately once the file gets deleted.