Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Using ds name present in PDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
dadiprav

New User


Joined: 26 Jan 2008
Posts: 18
Location: Mumbai

PostPosted: Tue Feb 19, 2008 12:59 am    Post subject: Using ds name present in PDS
Reply with quote

Hi,
I have a requirement like I need to use the dataset name in the dd statement if IEFBR14 where the dataset name is inturn present in a PDS member.

Eg. The dataset name A.B.C is present at the 4th position of a PDS C.D.E(F).
Now I need to use this A.B.C in IEFBR14.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Feb 19, 2008 1:04 am    Post subject:
Reply with quote

Hello,

Please post a much more clear example of what you want to do.

What is the "4th position of a pds"?

You question is completely clear to you, but may not be to others who read it.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Tue Feb 19, 2008 1:10 am    Post subject: Reply to: Using ds name present in PDS
Reply with quote

It sort of sounds like a situation where an INCLUDE statement might be useful.
Back to top
View user's profile Send private message
dadiprav

New User


Joined: 26 Jan 2008
Posts: 18
Location: Mumbai

PostPosted: Tue Feb 19, 2008 1:21 am    Post subject: Reply to: Using ds name present in PDS
Reply with quote

Hi,
The requirement is like,
I have to take exclusive control over a dataset.
This dataset must be extracted from a PDS member. I have done it using sort. Now I have a new PDS member containig the name of the sequential dataset I needed. I need to use this as a DD name in IEBGENER.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Feb 19, 2008 1:30 am    Post subject:
Reply with quote

Hello,

Quote:
I have to take exclusive control over a dataset.
In batch jcl, this would be DISP=OLD (but i'm sure you knew that).

To repeat,
Quote:
Please post a much more clear example of what you want to do.
Show the content of the pds. Show the jcl you have or need. Show what you extracted with sort.

You haven't answered
Quote:
What is the "4th position of a pds"?
This obviously means someting to you, but not to us.

Quote:
Now I have a new PDS member containig the name of the sequential dataset I needed. I need to use this as a DD name in IEBGENER
Show this . . .

The goal is not for the person with a question to post the smallest amount of incomplete detail. The better (which typically means in detail) you present your requirement, the better we can help.
Back to top
View user's profile Send private message
dadiprav

New User


Joined: 26 Jan 2008
Posts: 18
Location: Mumbai

PostPosted: Tue Feb 19, 2008 1:54 am    Post subject: Reply to: Using ds name present in PDS
Reply with quote

Hi,
Let my PDS be ECSATST.PRAVEEN.CNTLLIB(CNTLL)
Contents of this PDS is
DATA SET: ECSATBT.PRAVEEN.APAYBKUP
This has only one line.
I need to use this dataset ECSATBT.PRAVEEN.APAYBKUP in IEFBR14 as
------------------
STEP1 EXEC PGM=IEFBR14
dd1 dd dsn=ECSATBT.PRAVEEN.APAYBKUP,disp=old
------------

But the dataset ECSATBT.PRAVEEN.APAYBKUP varies for each run. So I need to extract that ds name from the above mentioned PDS only.

Hope the question is clear. If not pls let me know so that I can try to express in a different way.
Back to top
View user's profile Send private message
Amit Banerjee

New User


Joined: 12 Jan 2008
Posts: 14
Location: india

PostPosted: Tue Feb 19, 2008 4:33 am    Post subject:
Reply with quote

I'd say,if any program is writing the dataset name in the PDS member
then change it to write
dd1 dd dsn=ECSATBT.PRAVEEN.APAYBKUP,disp=old
in the member CNTLL.
Then have the job as
//JOBNAME .................................
// JCLLIB ORDER=ECSATST.PRAVEEN.CNTLLIB
//STEP1 EXEC PGM=IEFBR14
//FILE1 INCLUDE MEMBER=CNTLL
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Feb 19, 2008 10:26 am    Post subject:
Reply with quote

You can use REXX to get the dataset name, then internally (from within REXX), invoke any utility you want.

O.
Back to top
View user's profile Send private message
dadiprav

New User


Joined: 26 Jan 2008
Posts: 18
Location: Mumbai

PostPosted: Wed Feb 20, 2008 5:06 am    Post subject: Reply to: Using ds name present in PDS
Reply with quote

Hi Amit
The the thing I exactly need will be done with INCLUDE statement.
Can any one give the syntax or example of include statement if my control member is a Sequential dataset. Amit illustrated for a PDS member.
Thanks..
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Feb 20, 2008 8:42 am    Post subject: Re: Reply to: Using ds name present in PDS
Reply with quote

dadiprav wrote:
Hi Amit
The the thing I exactly need will be done with INCLUDE statement.
Can any one give the syntax or example of include statement if my control member is a Sequential dataset. Amit illustrated for a PDS member.
Thanks..


JCL INCLUDE will only work with a PDS member.
Back to top
View user's profile Send private message
dadiprav

New User


Joined: 26 Jan 2008
Posts: 18
Location: Mumbai

PostPosted: Wed Feb 20, 2008 10:29 pm    Post subject: Reply to: Using ds name present in PDS
Reply with quote

Hi,
My JCL is written as follows


//SORT JOB LA3409,'SORT1',REGION=8M,
// CLASS=S,MSGCLASS=X,NOTIFY=&SYSUID
//*
//JCLLIB ORDER=ECSA82T.PRAVEEN.CONTROL
//*
//JS0030 EXEC PGM=IEFBR14
//*
//FILE1 INCLUDE MEMBER=SORT7
//*


The contents of ECSA82T.PRAVEEN.CONTROL(SORT7) is as follows(as suggested by amit)


DD1 DD DSN=ECA3PBT.IVISAP71.APAYBKUP,DISP=OLD


I am getting a JCLERROR as INCLUDE MBR "SORT7 " NOT FOUND

Please help me out for sucessful run of this case.
Code:
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Feb 20, 2008 10:42 pm    Post subject:
Reply with quote

Is member SORT7 in ECSA82T.PRAVEEN.CONTROL?
Back to top
View user's profile Send private message
dadiprav

New User


Joined: 26 Jan 2008
Posts: 18
Location: Mumbai

PostPosted: Wed Feb 20, 2008 10:47 pm    Post subject: Reply to: Using ds name present in PDS
Reply with quote

Yes the member is present in that PDS
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Feb 20, 2008 10:51 pm    Post subject:
Reply with quote

The contents of SORT7 must be a valid jcl statement "DD1 DD DSN=ECA3PBT.IVISAP71.APAYBKUP,DISP=OLD" should be "//DD1 DD DSN=ECA3PBT.IVISAP71.APAYBKUP,DISP=OLD"
Back to top
View user's profile Send private message
dadiprav

New User


Joined: 26 Jan 2008
Posts: 18
Location: Mumbai

PostPosted: Wed Feb 20, 2008 11:14 pm    Post subject: Reply to: Using ds name present in PDS
Reply with quote

Hi Craq,
I have tried with ur recommendations

The error I am getting is like
At the JCLLIB stmt UNIDENTIFIED OPERATION FIELD
At the Include stmt INCLUDE SORT7 WAS NOT FOUND

Is there any Syntax error or am I missing anything. Pls help.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Feb 20, 2008 11:36 pm    Post subject:
Reply with quote

SORT7 must be a valid JCL statement
"DD1 DD DSN=ECA3PBT.IVISAP71.APAYBKUP,DISP=OLD"

should be
"//DD1 DD DSN=ECA3PBT.IVISAP71.APAYBKUP,DISP=OLD"
Back to top
View user's profile Send private message
dadiprav

New User


Joined: 26 Jan 2008
Posts: 18
Location: Mumbai

PostPosted: Thu Feb 21, 2008 3:26 am    Post subject: Reply to: Using ds name present in PDS
Reply with quote

Thanks Dick, Carq and Amit
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Feb 21, 2008 3:34 am    Post subject: Reply to: Using ds name present in PDS
Reply with quote

You're welcome icon_smile.gif

Is your process now doing what is needed?

If you post your solution, it will probably help someone else later. . .

d
Back to top
View user's profile Send private message
dadiprav

New User


Joined: 26 Jan 2008
Posts: 18
Location: Mumbai

PostPosted: Thu Feb 21, 2008 3:44 am    Post subject: Reply to: Using ds name present in PDS
Reply with quote

Here is my solution...
What I missed out was a syntax error in JCLLIB ORDER stmt....


//SORT JOB LA3409,'SORT1',REGION=8M,
// CLASS=S,MSGCLASS=X,NOTIFY=&SYSUID
//*
//JOBPROC JCLLIB ORDER=ECSA82T.PRAVEEN.CONTROL
//*
//JS0010 EXEC PGM=IEFBR14
//*
//FILE1 INCLUDE MEMBER=SORT7
//*
Code:
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Check if a member is present in libra... enrico-sorichetti All Other Mainframe Topics 1 Wed Feb 03, 2016 12:29 pm
No new posts File Status 35 inspite of File being ... Sunithap.84 COBOL Programming 10 Wed Apr 01, 2015 3:07 pm
No new posts Extraction of applications and jobs p... omprakash.mf IBM Tools 9 Fri Mar 28, 2014 10:05 am
No new posts Initializing filler default value whe... dsivapradeep COBOL Programming 6 Thu Feb 13, 2014 11:17 am
No new posts Ranking of Values Present in Differen... Souvik.Sinha DFSORT/ICETOOL 15 Wed Jun 12, 2013 12:54 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us