View previous topic :: View next topic
|
Author |
Message |
helga
New User
Joined: 11 Sep 2006 Posts: 23
|
|
|
|
How come you can say
Code: |
//DDN1 DD DISP=SHR,DSN=A.B.C
//DDN2 DD DISP=SHR,DSN=A.B.C |
but you can't say
Code: |
//DD1 DD DISP=(OLD,PASS,DELETE),DSN=&&ABC
//DD2 DD DISP=(OLD,PASS,DELETE),DSN=&&ABC |
ie, you can reference the same dataset for two DD statements within a step if that dataset is cataloged, but not if it is a temporary dataset? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
the disp parm OLD, requires exclusive control. You can't have 2 dd statements with exclusive control simultaneously. |
|
Back to top |
|
|
helga
New User
Joined: 11 Sep 2006 Posts: 23
|
|
|
|
that makes sense I suppose ...and explains why MOD won't work either
seeing as I can't use SHR with passed datasets, I guess I'll just have to do this in two steps, or catalog the dataset
...unless there IS a way to use SHR with passed datasets and I just don't know it
thx |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What kind of code is running?
Do both DDs need to be opened at the same time?
If the data is processed serially, might one DD statement suffice? |
|
Back to top |
|
|
helga
New User
Joined: 11 Sep 2006 Posts: 23
|
|
|
|
I was just doing a couple od SPLICEs using SORT
The reason the dataset was repeated was that I'm using Base + Overlay #1 then Base + Overlay #2
I was just saving a step, but I can get around it by using two steps instead. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I believe you could do that with only 1 dd for the base (unless i have misunderstood the process). In your control statements, just refer to the base DD multiple times. Each splice operation should be independent of the other(s). Might it be possible to splice base +Ov1, then base +Ov2. When the smoke clears will there be 1 or 2 output files? If 1, that should do it; if 2, one more splice would wrap it up.
If i've misunderstood, my bad. . . |
|
Back to top |
|
|
helga
New User
Joined: 11 Sep 2006 Posts: 23
|
|
|
|
you mean instead of using
Code: |
//IN1 DD <base>
// DD <overlay #1>
//IN2 DD <base>
// DD <overlay #2>
//TOOLIN DD *
SPLICE FROM(IN1) TO(OUT1) ON ...
SPLICE FROM(IN2) TO(OUT2) ON ... |
I could use
Code: |
//IN1 DD <base>
//IN2 DD <overlay #1>
//IN3 DD <overlay #2>
//TOOLIN DD *
COPY FROM(IN1) TO(TEMP1)
COPY FROM(IN2) TO(TEMP1)
SPLICE FROM(TEMP1) TO(OUT1) ON ...
COPY FROM(IN1) TO(TEMP2)
COPY FROM(IN3) TO(TEMP2)
SPLICE FROM(TEMP2) TO(OUT2) ON ... |
?
It certainly looks like it would work. I'll give it a try. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Drum roll. . . . . . .
And the verdict is. . . . |
|
Back to top |
|
|
helga
New User
Joined: 11 Sep 2006 Posts: 23
|
|
|
|
RC=0, but empty files.
gotta do some real work for a mo though
I'll be back |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
It looks to me like files temp1 and temp2 would need to have disp mod.
You could also use "COPY FROM(IN1) TO(TEMP1,TEMP2)" to copy to both files at once. |
|
Back to top |
|
|
|