View previous topic :: View next topic |
Author |
Message |
tcb Beginner
Joined: 07 Nov 2005 Posts: 14 Topics: 1
|
Posted: Wed Nov 23, 2005 7:47 am Post subject: Reference to instream DD from previous step |
|
|
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 |
|
 |
vkphani Intermediate

Joined: 05 Sep 2003 Posts: 483 Topics: 48
|
Posted: Wed Nov 23, 2005 8:16 am Post subject: |
|
|
Please post your code to guide you in a better way. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
tcb Beginner
Joined: 07 Nov 2005 Posts: 14 Topics: 1
|
Posted: Thu Nov 24, 2005 1:54 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
tcb Beginner
Joined: 07 Nov 2005 Posts: 14 Topics: 1
|
Posted: Thu Nov 24, 2005 8:00 am Post subject: |
|
|
Quote: | Did you really read the document I have supplied? 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 |
|
 |
Phantom Data Mgmt Moderator

Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Nov 24, 2005 8:41 am Post subject: |
|
|
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 |
|
 |
tcb Beginner
Joined: 07 Nov 2005 Posts: 14 Topics: 1
|
Posted: Thu Nov 24, 2005 8:57 am Post subject: |
|
|
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 |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Thu Nov 24, 2005 10:51 am Post subject: |
|
|
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 |
|
 |
tcb Beginner
Joined: 07 Nov 2005 Posts: 14 Topics: 1
|
Posted: Fri Nov 25, 2005 1:53 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Sat Nov 26, 2005 8:48 am Post subject: |
|
|
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 |
|
 |
tcb Beginner
Joined: 07 Nov 2005 Posts: 14 Topics: 1
|
Posted: Mon Nov 28, 2005 2:11 am Post subject: |
|
|
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 |
|
 |
|
|