View previous topic :: View next topic
|
Author |
Message |
ksouren007
New User
Joined: 30 Jun 2010 Posts: 85 Location: Toronto, ON
|
|
|
|
Hi,
I am having a query regarding the DISP=PASS for a temp file and a gdg file while trying to update it in the same step like below:
//IN1 DD DSN=&&TEMPCNTL,DISP=SHR
//OUT1 DD DSN=&&TEMPCNTL,DISP=(OLD,PASS)
This one doesnt work...
Again,
//IN1 DD DSN=TAY.AYA4AA.CONTROL.TEMP(+1),DISP=SHR
//OUT1 DD DSN=TAY.AYA4AA.CONTROL.TEMP(+1),
DISP=(OLD,PASS)
But this one works...
Now what I used to know regarding PASS is that, dataset passed to a subsequent step can be used only once in that step...but that is not explaining my second instance
Another thing if the same can be achieved using tempfile only (like reading and updating it in the same step) then how it can be done?? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
From the JCL User's Guide (manuals link at the top of the page), with emphasis added by me:
Quote: |
4.6.2.1.5 Passing a Data Set
If more than one step in a job needs the same data set, each DD statement for the data set can pass it to a later step. A data set can be passed only within a job. A data set cannot be passed and received within the same step. |
Whatever you are attempting to do, be aware that the IBM manual specifically states you cannot do it. Proceed further at your own (and your data) risk. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
If you are lucky these attempts will fail. . . Worse is when they run and corrupt data and it is not detected until much, much later and multiple sets of production data are damaged. . .
If you explain what the process does, someone may have a suggestion for a different approach. |
|
Back to top |
|
|
ksouren007
New User
Joined: 30 Jun 2010 Posts: 85 Location: Toronto, ON
|
|
|
|
Hi,
Thanks for the clarification and heads up...im going to use the following only but was just playing around with OLD, PASS parameter..
//IN1 DD DSN=TAY.AYA4AA.CONTROL.TEMP(+1),DISP=SHR
//IN2 DD DSN=TAY.AY4AA.ADD.FILE,DISP=SHR
//OUT1 DD DSN=TAY.AYA4AA.CONTROL.TEMP(+1),
DISP=(OLD,CATLG,DELETE)
//OUT2 DD DSN=TAY.AY4AA.ADD.DISCARD,DISP=NEW....DCB.. etc
My process in that step would be
IN1 - A control card file which has numeric 6 digit agent codes
IN2 - Add file which needs to be matched against IN1 and unique codes from it will be updated in the same control card file.
OUT1 - Updated IN1
OUT2 - unmatched records from IN2.
This matching is done by SYNCTOOL
Now, I dont want to use a seperate file in OUT1 as that would again be passed to the next step which does a deletion from that file just reverse like above. So I want to update (Add/Delete) in the same file otherwise 2 more REPRO steps needs to be added which i want to avoid.
Was just trying to play around with a TEMP file instead of a CATLGed file when i observed the OLD,PASS thing! Thanks for your help. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
There is no good reason to try and re-use the file from IN1 as OUT1.
Hopefully, someone involved with promoting this from test to productoin will refuse to promote it. This has nothing to do with disp - it is just not acceptable on well-managed systems. |
|
Back to top |
|
|
|