Page 1 of 1

Preferred way of creating a PDS?

Posted: Thu Nov 12, 2015 11:51 am
by Utkarsh Chhabra
In a recent interview I was asked: How to create a PDS through JCL?

I said, there are many ways of doing it. for example we can create it using IEBGNER an gave a symbolic representation of the following JCL:

Code: Select all

//STEP010  EXEC PGM=IEBGENER                                  
//SYSUT1   DD DUMMY,                                          
//            DCB=(LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PO)            
//SYSUT2   DD DSN=some.File.name,                  
//         DISP=(NEW,CATLG,DELETE),                            
//         UNIT=SYSDA,                                        
//         SPACE=(CYL,(5,5),RLSE),                            
//         DCB=(LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PO)          
//SYSPRINT DD SYSOUT=*                                        
//SYSOUT   DD SYSOUT=*                                        
//SYSIN    DD DUMMY 
To this interviewer said, I can also do this using:

Code: Select all

//STEP011 EXEC PGM=IEFBR14 
//DD1    DD DSN=DSNNAME,SPACE=(TRK,(2,1,1)),UNIT=SYSDA, 
//                DCB=(DSORG=PO,LRECL=80,RECFM=FB,BLKSIZE=800) 
//                DISP=(NEW,CATLG,DELETE) 
//
Given the choice, which JCL you'll use to create the PDS?

Well I was like... :unknown:. Can someone on the ite please suggest what could be the answer.

Re: Preferred way of creating a PDS?

Posted: Thu Nov 12, 2015 1:18 pm
by zprogrammer
Creating a PDS with DUMMY in IEBGENER will give unpredictable results, It is better to use IEFBR14 to create a new PDS

Re: Preferred way of creating a PDS?

Posted: Thu Nov 12, 2015 1:41 pm
by nicc
Also, the IEBGENER example has no space allocation for the directory. The BR14 example should not have a BLKSIZE of 800