IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Creating a PS using JCL


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
neo_yodha

New User


Joined: 10 Apr 2006
Posts: 6

PostPosted: Tue May 16, 2006 12:02 pm
Reply with quote

Hi,
can we create a PS in a PDS using IEFBR14, like this ;

//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=RK.MYDIR.FILES(NEW1),DISP=(NEW,CATLG),
......

here, RK.MYDIR.FILES is a PDS which already exists, i want to create NEW1 in this PDS. but, i failed.

thank you,
rk
Back to top
View user's profile Send private message
mftrigger

New User


Joined: 18 Feb 2006
Posts: 23
Location: chennai

PostPosted: Tue May 16, 2006 5:19 pm
Reply with quote

no chance .. u cant create a ps inside pds...

but instead u can use member in pds as ps...
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Thu Jun 08, 2006 12:06 pm
Reply with quote

Yes...there is a way u can create the member of an PDS thru your JCL
But need to change your JCL.

//STEP1 EXEC PGM=IEFBR14
//NEW1 DD DSN=RK.MYDIR.FILES(NEW1),DISP=(SHR),
......
The step name and the Member name should be same and DISP should be SHR. i.e,
//MEMNAME DD DSN=YOUR.PDS.NAME(MEMNAME),DISP=SHR

~Vamsi
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Jun 09, 2006 11:08 pm
Reply with quote

This

Code:

//STEP1 EXEC PGM=IEFBR14
//NEW1 DD DSN=RK.MYDIR.FILES(NEW1),DISP=(SHR)


will not work, since a new member won't be created until the DD is opened for output.

This, however, will work:

Code:

//STEP1    EXEC PGM=IEBGENER                           
//SYSUT1   DD   DUMMY,RECFM=FB,LRECL=80                 
//SYSUT2   DD   DSN=RK.MYDIR.FILES(NEW1),DISP=(SHR)     
//SYSPRINT DD   SYSOUT=*                               
//SYSIN    DD   DUMMY                                   


as will this:

Code:

//STEP1    EXEC PGM=IEBUPDTE,PARM=NEW       
//SYSUT2   DD   DSN=RK.MYDIR.FILES,DISP=SHR   
//SYSPRINT DD   SYSOUT=*                     
//SYSIN    DD   *                           
./        ADD   NAME=NEW1
                                             
/*                                   
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Mon Jun 12, 2006 10:23 am
Reply with quote

Since the PDS is already created...we can open with oputput mode.

Even though the member which is to be created for the first time, the DISP is goign to be SHR.

~Vamsi
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Creating Unix Directory using COBOL i... COBOL Programming 2
No new posts Creating Report using SORT DFSORT/ICETOOL 7
No new posts Creating CSV file from Variable recs ... DFSORT/ICETOOL 11
No new posts Creating a VB file PL/I & Assembler 10
No new posts Creating filelist ps file JCL & VSAM 2
Search our Forums:

Back to Top