Let's understand Mainframe
Home Tutorials Interview Q&A Quiz Mainframe Memes Contact us About us

Module 3: Access Method Services (AMS)


Defining LDS

  • What is LDS? Please refer Module 2 <LINK>
  • LDS cluster can be defined using DEFINE CLUSTER command which is explained along with Syntax in ‘IDCAMS DEFINE CLUSTER Command’ section. <LINK>
  • Defining LDS is identical to defining an ESDS. This is because LDS also has only data component and does not contain Primary key.
  • Below is the most basic Syntax for defining RRDS cluster:-

    DEFINE CLUSTER - ( NAME(lds-file-name) - CYLINDERS ( primary[ secondary] ) - VOLUMES ( volser1 [volser2...] ) - [CONTROLINTERVALSIZE ( size ) ] - LINEAR ) - [ DATA - ([NAME(lds-file-name.DATA)]) ]

  • Meaning of each of above parameters and other few more parameters(which are not included in above Simplified Syntax) can be referred in ‘IDCAMS- DEFINE CLUSTER command’ Section <LINK>
  • LINEAR parameter must be coded in DEFINE CLUSTER command to instruct VSAM that the cluster is LDS.
  • Since LDS does not have key field, Parameters related to key fields are not coded when defining LDS cluster
  • RECORDSIZE parameters must not be coded for LDS, because all bytes are data bytes in data component and it does not contain RDF or CIDF fields
  • LDS has only DATA component and thus INDEX component is not coded for LDS cluster
  • FREESPACE parameter is not required either, since an LDS has no embedded free space between records
  • Below JCL example depicts the creation of LDS cluster:-

    //DEPTJOB JOB A123,’STEVE’ //LDSDFN EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * DEFINE CLUSTER(NAME(PAYT.PAYROLL.PRCSLDS.MSTR) - CYLINDERS ( 5 1 ) - VOLUME(VSMP91) - CONTROLINTERVALSIZE(4096) - LINEAR ) - DATA( - NAME(PAYT.PAYROLL.PRCSLDS.MSTR.DATA)) /*

  • Description: - Above job will create VSAM LDS cluster since LINEAR is specified as type of cluster. It will be created with name ‘PAYT.PAYROLL.PRCSLDS.MSTR’ along with DATA component having name ‘PAYT.PAYROLL.PRCSRRDS.MSTR.DATA’. This cluster will be created on volume ‘ VSMP91’. 5 cylinders of primary and 1 cylinders of secondary space will be allocated. The size of control interval specified is 4096 bytes.






© copyright mainframebug.com
Privacy Policy