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

Using ds name present in PDS


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Tue Feb 19, 2008 1:04 am
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

Global Moderator


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

PostPosted: Tue Feb 19, 2008 1:10 am
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
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

Moderator Emeritus


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

PostPosted: Tue Feb 19, 2008 1:30 am
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
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
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: 2359
Location: Israel

PostPosted: Tue Feb 19, 2008 10:26 am
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
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
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
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
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
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
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
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
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
Reply with quote

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

Moderator Emeritus


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

PostPosted: Thu Feb 21, 2008 3:34 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Search the strings present in ps file... All Other Mainframe Topics 8
No new posts Verify WITH UR present inside program... CLIST & REXX 23
This topic is locked: you cannot edit posts or make replies. Comparing current time with the time ... SYNCSORT 1
No new posts sending email from jcl using the mail... JCL & VSAM 5
No new posts Record Not found in AlX but record re... COBOL Programming 7
Search our Forums:

Back to Top