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

Module 4: JCL DD Statement


DD SPACE Parameter

Space parameter is used to specify storage requirements for dataset. It allocates storage for new dataset on direct attached storage devices. Storage requirement can be specified to the operating system in tracks, cylinders and blocks

Syntax:-

SPACE=(storage-type, (primary, secondary, directory), RLSE,CONTIG,MXIG,ROUND)

Where,

storage-type :- It’s value could be TRK or CYL or BLK. This field is used to specify the allocation unit that is whether in tracks or cylinders or in specified block length(bytes). Block length can be number between 1 and 65535.

primary :- Amount of primary space to be allocated at the time of data set created

secondary :- When primary is full, the specified space in the secondary will be additionally allocated. If suppose we do not code secondary, in such case when primary is full, then the step will abend with SD37

directory :- This sub parameter is used when defining primary datasets. This storage space is used to record the names and locations of the members created within the partitioned data set. If storage space for a partitioned data set is requested, and this parameter is not coded, the job will abend. One directory block contains 256 bytes. One directory block is used to store 5 to 6 members

RLSE :- Specify the request that space originally allocated to an output data set to be released when the data set is closed. For example, if 50 tracks assigned to dataset, and only 40 are used by that step, then remaining space of 10 tracks must be released after the data set has been created an written to. Release occurs only if the dataset is open for output and the last operation was a write.

CONTIG :- This is used to request that space allocated to the dataset must be contiguous. This parameter impacts only primary allocation

MXIG :- Used to request a large area of contiguous space. This parameter affects only primary allocation

ROUND :- Used to request entire cylinder for storage of dataset

Example:-

//DEPTJOB JOB A123,’STEVE’ //STEP1 EXEC PGM=PROG1 //DATA1 DD DSN=DEPT1.EMP1.DATA1, // DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA,SPACE=(CYL,(5,2))

In above example, DEPTJOB is submitted. PROG1 is executed. 5 cylinders are requested as primary space and additional 2 cylinders are requested as secondary space. If 5 cylinder of space is insufficient for DATA1, then additional space will be allocated automatically by the system






© copyright mainframebug.com
Privacy Policy