Page 1 of 1

Create PDS member using COBOL program dynamically.

Posted: Mon Sep 14, 2015 1:46 pm
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.

Re: Create PDS member using COBOL program dynamically.

Posted: Mon Sep 14, 2015 3:20 pm
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?

Re: Create PDS member using COBOL program dynamically.

Posted: Mon Sep 14, 2015 4:39 pm
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.

Re: Create PDS member using COBOL program dynamically.

Posted: Wed Sep 16, 2015 3:26 am
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.

Re: Create PDS member using COBOL program dynamically.

Posted: Mon Nov 30, 2015 12:28 pm
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.

Re: Create PDS member using COBOL program dynamically.

Posted: Mon Nov 30, 2015 3:40 pm
by nicc
As BPXWDYN was not mentioned until the post AFTER your first quote, why do you think there is a connection?

Re: Create PDS member using COBOL program dynamically.

Posted: Fri Dec 11, 2015 8:42 am
by Sachin Kumar
Because I am not sure and have no experience in this, so looked for a guidance.

Re: Create PDS member using COBOL program dynamically.

Posted: Fri Dec 11, 2015 7:37 pm
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.

Re: Create PDS member using COBOL program dynamically.

Posted: Fri Dec 18, 2015 4:38 pm
by Sachin Kumar
Sorry for the confusion created. I'll work it out. Thanks for the replies.