MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reference to instream DD from previous step

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
tcb
Beginner


Joined: 07 Nov 2005
Posts: 14
Topics: 1

PostPosted: Wed Nov 23, 2005 7:47 am    Post subject: Reference to instream DD from previous step Reply with quote

Hi, all.

I have two identical instream DDs. Can I make reference from 2nd DD to 1st? DDs place in different steps.

Thanks.
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Wed Nov 23, 2005 8:16 am    Post subject: Reply with quote

Please post your code to guide you in a better way.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Nov 23, 2005 8:31 am    Post subject: Reply with quote

tcb,

Check this link which explains in detail about backward reference along with examples.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B631/4.4?DT=20030423085347

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tcb
Beginner


Joined: 07 Nov 2005
Posts: 14
Topics: 1

PostPosted: Thu Nov 24, 2005 1:54 am    Post subject: Reply with quote

vkphani wrote:
Please post your code to guide you in a better way.

Code:

//STEP1    EXEC PGM=...
//PARMS1   DD *
..
/*
//STEP2    EXEC PGM=...
//PARMS2   DD *
..
/*

PARMS1 and PARMS2 describe indentical data.

kolusu,
JCL Reference describes that how I can make reference to DD attributes (like DCB or DNS). I want make reference to DD.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Nov 24, 2005 7:10 am    Post subject: Reply with quote

Quote:

kolusu,
JCL Reference describes that how I can make reference to DD attributes (like DCB or DNS). I want make reference to DD.

tcb,

Did you really read the document I have supplied? Twisted Evil In the same link at the bottom you have a link for examples of backward reference and in that example2 clearly shows how to reference a prior STEP DD

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B631/4.4.1?SHELF=&DT=20030423085347&CASE=

Read it once again

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tcb
Beginner


Joined: 07 Nov 2005
Posts: 14
Topics: 1

PostPosted: Thu Nov 24, 2005 8:00 am    Post subject: Reply with quote

Quote:
Did you really read the document I have supplied? Twisted Evil In the same link at the bottom you have a link for examples of backward reference and in that example2 clearly shows how to reference a prior STEP DD
Kolusu


Kolusu,
I've read this many times. Thanks for information.
When I make reference DSN=*.STEP1.PARMS1 appears message
Code:

 IEF344I GTDFW032 COPY2 PARMS - ALLOCATION FAILED DUE TO DATA FACILITY SYSTEM ERROR
 IGD17045I SPACE NOT SPECIFIED FOR ALLOCATION OF DATA SET USERUID.GTDFW032.JOB09780.D0000102.?                                                                                                                           
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Nov 24, 2005 8:41 am    Post subject: Reply with quote

tcb,

Please post the complete JCL you used so that we can see what might have gone wrong.

Looking at your sysout, I can guess only one thing. You are referring to a already created dataset (by backward reference) but I think you gave the DISP=(new,catlg) OR DISP(,CALTG). instead of DISP=SHR / DISP=OLD. Meaning you are trying to create the file again. When you do this, you must give SPACE parameter.

Code:

 IGD17045I SPACE NOT SPECIFIED FOR ALLOCATION OF DATA SET


Thanks,
Phantom
Back to top
View user's profile Send private message
tcb
Beginner


Joined: 07 Nov 2005
Posts: 14
Topics: 1

PostPosted: Thu Nov 24, 2005 8:57 am    Post subject: Reply with quote

Phantom wrote:
Please post the complete JCL you used so that we can see what might have gone wrong.

Looking at your sysout, I can guess only one thing. You are referring to a already created dataset (by backward reference) but I think you gave the DISP=(new,catlg) OR DISP(,CALTG). instead of DISP=SHR / DISP=OLD. Meaning you are trying to create the file again. When you do this, you must give SPACE parameter.


Phantom,
I try to make reference to instream DD. Instream DD does not allow specify DISP parameter.
Code:

//COPY1    EXEC PGM=...,REGION=20M
//STEPLIB  DD DSN=...,DISP=SHR
//FILEDEFS DD DSN=...,DISP=SHR
//SYSUDUMP DD SYSOUT=*
//CEEDUMP  DD SYSOUT=*
//SYSPR001 DD SYSOUT=*
//SYSIN001 DD DUMMY
//STKND001 DD DUMMY,DCB=BLKSIZE=3200
//ADRIN001 DD *
 COPYDUMP INDD(TPDDI001) OUTDD(TPDDO001)
//PARMS    DD *
...
/*
//COPY2    EXEC PGM=...,REGION=20M
//STEPLIB  DD DSN=...,DISP=SHR
//FILEDEFS DD DSN=...,DISP=SHR
//SYSUDUMP DD SYSOUT=*
//CEEDUMP  DD SYSOUT=*
//SYSPR001 DD SYSOUT=*
//SYSIN001 DD DUMMY
//STKND001 DD DUMMY,DCB=BLKSIZE=3200
//ADRIN001 DD *
 COPYDUMP INDD(TPDDI001) OUTDD(TPDDO001)
//PARMS    DD *
...
/*
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu Nov 24, 2005 10:51 am    Post subject: Reply with quote

I haven't tried this, but it seems it should work: Add an IEBGENER step before these steps. Use that to copy the data to a temporary data set and use refer backs to reference the SYSUT2 (disp=new,pass) of the IEBGENER. I don't think you can refer back to instream data because I suspect that the 'data set' is allocated only for the life of the step in which it exists. Pure speculation on my part though. One problem with referbacks is that you can only have a couple of references within a step. That is why the BATCHPDF file creates a real data set for the ISPF profile which is refered to 3 times within the same step and then deletes it in a final step.
Back to top
View user's profile Send private message Visit poster's website
tcb
Beginner


Joined: 07 Nov 2005
Posts: 14
Topics: 1

PostPosted: Fri Nov 25, 2005 1:53 am    Post subject: Reply with quote

semigeezer wrote:
I haven't tried this, but it seems it should work: Add an IEBGENER step before these steps. Use that to copy the data to a temporary data set and use refer backs to reference the SYSUT2 (disp=new,pass) of the IEBGENER. I don't think you can refer back to instream data because I suspect that the 'data set' is allocated only for the life of the step in which it exists. Pure speculation on my part though. One problem with referbacks is that you can only have a couple of references within a step. That is why the BATCHPDF file creates a real data set for the ISPF profile which is refered to 3 times within the same step and then deletes it in a final step.


semigeezer,
thank you.
This is the way that I use now.
It seems like you are right that I cannot refer back to instream DD.
Maybe someone knows another way to make this without IEBGENER?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sat Nov 26, 2005 8:48 am    Post subject: Reply with quote

tcb,

Why not put the first instream data in a dataset and refer that dataset in all other steps?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tcb
Beginner


Joined: 07 Nov 2005
Posts: 14
Topics: 1

PostPosted: Mon Nov 28, 2005 2:11 am    Post subject: Reply with quote

kolusu wrote:
Why not put the first instream data in a dataset and refer that dataset in all other steps?


I have many JCLs with various instream data. That isn't good idea to create one more data set when I create new JCL.

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group