LDS
LDS
- LDS is a short form of Linear DataSet and is a byte-stream dataset in traditional z/OS files.
- LDS is used mainly by IBM DB2, z/OS system but is rarely used in application programs.
- Data from LDS is accessed as byte-addressable strings in virtual storage.
- LDS has a control interval (CI) size multiple of 4096 bytes and has no control information in its CI. i.e., no RDFs and CIDFs.
- LDS is the VSAM dataset type used by DIV (Data-In-Virtual) facility.
- Logical records should be blocked and deblocked by the application program to avoid concurrent updates.
- Logical records are not visible from the VSAM point of view. i.e., LDS is a non-VSAM dataset with some VSAM features.
- Unlike the ESDS and RRDS, LDS contains a DATA component only.
DEFINE LDS Syntax -
IDCAMS DEFINE CLUSTER command with LINEAR is used to create the LDS dataset.
Syntax - JCL for creating LDS dataset with minimum parameters
//job-card
//*
//STEP01 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE CLUSTER (NAME(userid.CLUSTER.NAME) –
CYLINDERS(primary secondary) –
VOL(XXXXXX) –
BUFFERSPACE(buffer-space) –
CISZ(ci-size) –
FREESPACE(primary secondary) –
LINEAR –
NOREUSE –
OWNER(userid) ) –
DATA (NAME(userid.CLUSTER.NAME.DATA)) –
CATALOG(XXXXXX)
/*
Refer IDCAMS DEFINE command for full set of parameters.
Create LDS Example -
Scenario - Create LDS using the IDCAMS utility.
JCL -
----+----1----+----2----+----3----+----4----+----5----+
...
//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))
/*
...
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.
Delete LDS Example -
Scenario - Delete LDS using the IDCAMS utility.
JCL -
----+----1----+----2----+----3----+----4----+----5----+
...
//STEP01 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE 'MATEGJ.TEST.LDS'
/*
...
In the above JCL, MATEGJ.TEST.LDS is the LDS name that is planned to delete.
Output -
Once the above JCL is submitted, check the MAXCC of the job for any errors. If the MAXCC is 00 or 04, LDS successfully got deleted.