Define LDS Example


Scenario - Create LDS using the IDCAMS utility.

JCL -

----+----1----+----2----+----3----+----4----+----5----+
//MATEGJL JOB (123),'MTH',CLASS=A,MSGCLASS=A,
//             MSGLEVEL=(1,1),NOTIFY=&SYSUID
//***********************************************
//* DEFINE VSAM LDS CLUSTER
//***********************************************
//STEP01   EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSOUT   DD SYSOUT=*
//SYSIN    DD  *
  DEFINE CLUSTER(NAME(MATEGJ.TEST.LDS)  - 
     CYLINDERS(2,1)       -
     CISZ(4096)           -
     VOLUMES(DEVHD4)      - 
     LINEAR               -
     REUSE     )          -
  DATA(NAME(MATEGJ.TEST.LDS.DATA))
/*

In the above JCL, MATEGJ is the userid and changes all as required.

Output -

Once the above JCL is submitted, check the MAXCC of the job for any errors. If the MAXCC is 00 or 04, LDS is successfully created.

Create LDS Output

Verify the LDS in 3.4 (Dataset List utility) or any File management tools.

Create LDS Output

Explaining Example -

In the above example,

  • CYLINDERS(2,1) specifies the primary memory allocation is 2 CYLINDERS, and secondary memory allocation is 1 CYLINDER.
  • VOLUMES(DEVHD4) specifies that allocate the LDS on volume DEVHD4.
  • LINEAR parameter specifies the file is to create LDS.
  • REUSE specifies that the memory can reuse immediately once the file gets deleted.