| Q. I know that the DD Statement tells, what’s the Input file or Output File. However, on computer storage how does the MVS know where to find your file? How do you specify the location of your dataset? Its like searching for a needle in a haystack! | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Yeah good question! The Mainframe Computer stores thousands of files(Datasets) in different areas of Memory(Storage). Each data-set is stored at a different location. Who keeps track of, where a data-set is stored? The System Catalog. The System Catalog is special data-set(file) that acts as the address book of the MVS Operating System. The System Catalog contains an entry for all the datasets on a Mainframe Computer. It stores the name of the dataset, followed by the actual physical location of the dataset. Should you need the phone no. of your friend, you quickly search through the contact list/address-book that you maintain. Similarly, you wanna find a data-set, better search in the System Catalog. Well, those datasets whose location has been recorded in the System Catalog, are called Cataloged Datasets. Datasets whose location is not tracked by the System Catalog, are called Uncataloged Datasets. Cataloged Datasets :- When a DD Statement mentions an input or output file, that has been cataloged, MVS can easily find its place of residence(address) from the System Catalog. Uncataloged Datasets :- When a DD Statement refers to and Input or Output Dataset, whose location has not been registered in the System Catalog, you must tell the location of the dataset manually. Now-a-days, whenever you create datasets in TSO, all the datasets are automatically cataloged. This implies that you can find the dataset, merely by its name. However, formerly, if you had to specify the location of the dataset manually, you had to use the UNIT and VOL(Volume) parameters of the DD Statement. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q. What is the UNIT Parameter? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| A. Sometimes, the Input Dataset from which we want to read Data Records may be located on a TAPE Drive. Also, when IBM Mainframe Servers are installed(a process called as SYSGEN), different I/O Devices are assigned an Address. This device address uniquely identifies the device. Apart from this, similar devices are grouped together and sometimes assigned a symbolic name. UNIT parameter can be used to identify a device, by the device address, symbolic name or mentioning TAPE(for tape drive).
This implies, that the input dataset TRGD56.DEMO.INPUT is located on the device group whose symbolic name is SYSDA. The UNIT parameter has AFF(Affinity) sub-parameter. To use the same unit, that has been used by a prior DD Statement, AFF sub-parameter is used.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q. What is the VOL(VOLUME) Parameter used for? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The VOL parameter is used to specify disk volume on which the Input and Output datasets reside. The VOL parameter has several sub-parameters.
Let’s see some examples.
In the above example, the dataset resides on the volume VOL1. Now, lets see another example wherein, the dataset resides on 3 volumes.
In the above example, the dataset TRGD56.DEMO.INPUT resides on all the 3 volumes VOL1, VOL2 and VOL3. This requests the MVS O/S to mount all the three volumes at the same time.
Here, the Output dataset will be created on the tape drive, whose serial number is T02947.
Here, the Output dataset will be created on the device serial number T02947, and this volume will not be dismounted until the Batch JOB ends. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q. What is the LABEL parameter used for? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Whenever tape datasets are used as Input Dataset or Output Dataset, LABEL parameter can be used.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q. What is the SPACE parameter used for? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| When we create a new dataset, we would like to specify, how much storage space to reserve for the dataset. Storage Space Allocation can be specified using the SPACE parameter. Firstly, we must specify the unit of memory. We can specify it as BLKS(Blocks), TRKS(Tracks), CYL(Cylinders), KB(Kilotbytes) or MB(MegaBytes). Secondly, we must specify space we need - (primary-space,extra-space). Thus, if we specify the space as SPACE=(TRKS,(10,2)) Primary Space = 10 Tracks. Secondary Space = 2 tracks. What the MVS Operating System does is, it reserves 10 tracks(primary) of space for the dataset initially to begin with. Let’s day, you have made a dataset, and stored data. Over a period of time, as more and more data is added to the file, it gets inflated, and grows in size. At some point, 10 tracks of space falls insufficient for the data. Thus, the MVS allocates an extra-space of 2 tracks to the continously growing dataset. Again, when the dataset runs out of space, the MVS Operating allocates another 2 tracks of extra space to it. This way, the MVS can allocate the extra-space upto 15 times. Thus, as a dataset grows bigger in size over a period of time, the maximum space it could get is Primary + 15 times Extra-space = 10 + 2 x 15 = 40 tracks. To begin with, the size of the dataset is 10 tracks, as the dataset gets filled over time, it grows(as extra-space of 2 tracks is given to it each time) 12, 14, 16, ..., upto maximum 40 tracks. The SPACE Parameter also has sub-parameters like RLSE, MXIG, CONTIG and ROUND.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Q. What is the DCB(Data Control Block) Parameter used for? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The DCB parameter is used to specify the organization of records within the dataset. The DCB Parameter has 4 sub-parameters :
Let’s understand the DCB parameter with the help of an example.
Technorati Tags: IBM,Mainframes,Servers,IBM Mainframes,JCL Tutorial,JCL,DD,Quasar Chunawalla,UNIT,TAPE Drive,AFF,sub-parameter,Affinity,VOL,Volume,SER,Serial,REF,Referback,PRIVATE,RETAIN,SEQ,Sequence,LABEL,SPACE,Storage Space,TRKS,Track,CYL,Cylinder,BLKS,Block,KB,MB,PRIMARY,SECONDARY,Extends,RLSE,Release,CONTIG,Contiguous,MXIG,ROUND,DCB,Data Control Block,RECFM,Record Format,F,FB,V,VB,Fixed Blocked,Variable Blocked,Uniform,U,LRECL,Logical Record Length,Record Length,BLKSIZE,Block Size,DSORG,DIRBLKS,PS,Physical Sequential,PDS,Partitioned Dataset,PO,Partitioned Organized,IS,Indexed Sequential,DA,Direct Access |
Bulletin Board
|
|
|
- Re-writing of select JCL and VSAM Tutorials is under-way, orientation would be more hands-on, and practical - New Tutorials on COBOL-VSAM programs shall be put up pretty soon - IMS DB/DC Tutorials to start up in April, 2010 |
Friday, July 3, 2009
JCL Tutorial – 08 : DD Statement – Part III
Subscribe to:
Post Comments (Atom)
Note :
| © Copyright – Quasar Chunawalla, 2010.
Note : The copyrights of all the material, text and pictures posted in this website belong to the author. Any instance of lifting the material from this website, shall be considered as an act of plagiarism. For any clarifications, please mail at quasar.chunawalla@gmail.com |

1 comments:
here ,This chaper should be II,not III.
Thanks.
Post a Comment