Create PDS member using COBOL program dynamically.

OS/VS COBOL, COBOL II, Enterprise COBOL for z/OS. OpenCOBOL and OOCobol.
Post Reply
Sachin Kumar
Registered Member
Posts: 24
Joined: Wed Jul 17, 2013 9:08 am

Create PDS member using COBOL program dynamically.

Post by Sachin Kumar »

Hi,

I need to create members in a given PDS using a COBOL program, can we do this? Will there be a different JCL for it? Kindly guide me.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Create PDS member using COBOL program dynamically.

Post by nicc »

You will only be able to create one member per PDS per execution, I believe. But why have you not written a little test program to try it out?
Regards
Nic
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: Create PDS member using COBOL program dynamically.

Post by William Collins »

You just specify the PDS(member) on the DD for your output dataset. Realise that DISP refers to the dataset, not the member. Also realise that an existing member will be readily overwritten.
chaat
New Member
Posts: 5
Joined: Thu Oct 30, 2014 8:12 am

Re: Create PDS member using COBOL program dynamically.

Post by chaat »

you could use dynamic allocation via BPXWDYN and create as many as you wish.

just remember that restart / recovery using pds members can be much more challenging than qsam files.
Chuck Haatvedt
Sachin Kumar
Registered Member
Posts: 24
Joined: Wed Jul 17, 2013 9:08 am

Re: Create PDS member using COBOL program dynamically.

Post by Sachin Kumar »

Please guide - are these two statements for BPXWDYN ?
William Collins wrote:Also realise that an existing member will be readily overwritten.
chaat wrote:you could use dynamic allocation via BPXWDYN and create as many as you wish.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Create PDS member using COBOL program dynamically.

Post by nicc »

As BPXWDYN was not mentioned until the post AFTER your first quote, why do you think there is a connection?
Regards
Nic
Sachin Kumar
Registered Member
Posts: 24
Joined: Wed Jul 17, 2013 9:08 am

Re: Create PDS member using COBOL program dynamically.

Post by Sachin Kumar »

Because I am not sure and have no experience in this, so looked for a guidance.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Create PDS member using COBOL program dynamically.

Post by nicc »

Put another way: the first quote you highlighted was posted BEFORE any mention of BPXWDYN so how coud it refer to a post that came after? As to the second quote - that is the mention of BPXWDYN so obviously that quote refers to BPXWDYN.
Regards
Nic
Sachin Kumar
Registered Member
Posts: 24
Joined: Wed Jul 17, 2013 9:08 am

Re: Create PDS member using COBOL program dynamically.

Post by Sachin Kumar »

Sorry for the confusion created. I'll work it out. Thanks for the replies.
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 “IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.”