View previous topic :: View next topic
|
Author |
Message |
dadiprav
New User
Joined: 26 Jan 2008 Posts: 18 Location: Mumbai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
It sort of sounds like a situation where an INCLUDE statement might be useful. |
|
Back to top |
|
|
dadiprav
New User
Joined: 26 Jan 2008 Posts: 18 Location: Mumbai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dadiprav
New User
Joined: 26 Jan 2008 Posts: 18 Location: Mumbai
|
|
|
|
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 |
|
|
Amit Banerjee
New User
Joined: 12 Jan 2008 Posts: 14 Location: india
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You can use REXX to get the dataset name, then internally (from within REXX), invoke any utility you want.
O. |
|
Back to top |
|
|
dadiprav
New User
Joined: 26 Jan 2008 Posts: 18 Location: Mumbai
|
|
|
|
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 |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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 |
|
|
dadiprav
New User
Joined: 26 Jan 2008 Posts: 18 Location: Mumbai
|
|
|
|
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.
|
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Is member SORT7 in ECSA82T.PRAVEEN.CONTROL? |
|
Back to top |
|
|
dadiprav
New User
Joined: 26 Jan 2008 Posts: 18 Location: Mumbai
|
|
|
|
Yes the member is present in that PDS |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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 |
|
|
dadiprav
New User
Joined: 26 Jan 2008 Posts: 18 Location: Mumbai
|
|
|
|
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 |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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 |
|
|
dadiprav
New User
Joined: 26 Jan 2008 Posts: 18 Location: Mumbai
|
|
|
|
Thanks Dick, Carq and Amit |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
You're welcome
Is your process now doing what is needed?
If you post your solution, it will probably help someone else later. . .
d |
|
Back to top |
|
|
dadiprav
New User
Joined: 26 Jan 2008 Posts: 18 Location: Mumbai
|
|
|
|
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
//*
|
|
Back to top |
|
|
|