Page 1 of 1

how to create a PDS member using JCL

PostPosted: Sat Mar 26, 2011 7:20 am
by Pumpkin
hi,
i use IEFBR14 in JCL to create PS dataset and PDS dataset,but how to create a member for existing PDS dataset? how to set the DISP or other parameters?
Thanks a lot!

Re: how to create a PDS member using JCL

PostPosted: Sat Mar 26, 2011 7:39 am
by MrSpock
You have to actually write something, so you need a real program - SORT, IEBGENER, IEBUPDTE, whatever you feel like using.

Re: how to create a PDS member using JCL

PostPosted: Sat Mar 26, 2011 9:01 am
by steve-myers
As MrSpock says, you have to use a program that will write some data into the PDS, for example -
//INITPDS EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//SYSUT2   DD  DSN=newpds(member),...
//SYSUT1   DD  *
Data for a new PDS member
/*

JCL like this will allocate the PDS, but it won't write anything to it.
//ALLOCPDS EXEC PGM=IEFBR14
//NEWPDS   DD  DISP=(NEW,CATLG),DSN=pdsname(member),...

MrSpock gave a list of "standard" programs you can use, though there are many more programs, including programs that you write or have already written.

Re: how to create a PDS member using JCL

PostPosted: Sat Mar 26, 2011 5:02 pm
by Robert Sample
And remember, DISP is for the data set, NOT for the member.

Re: how to create a PDS member using JCL

PostPosted: Mon Mar 28, 2011 6:45 am
by Pumpkin
thanks a lot!