Preferred way of creating a PDS?

All sort of Mainframes Interview Questions.
Post Reply
Utkarsh Chhabra
New Member
Posts: 2
Joined: Mon Jul 28, 2014 7:37 pm

Preferred way of creating a PDS?

Post 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.
zprogrammer
Global Moderator
Global Moderator
Posts: 588
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars

Re: Preferred way of creating a PDS?

Post by zprogrammer »

Creating a PDS with DUMMY in IEBGENER will give unpredictable results, It is better to use IEFBR14 to create a new PDS
zprogrammer
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Preferred way of creating a PDS?

Post by nicc »

Also, the IEBGENER example has no space allocation for the directory. The BR14 example should not have a BLKSIZE of 800
Regards
Nic
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Interview Questions.”