Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Hmmm ... I'm not sure what Priyesh was trying to do with SPLICE. Alain is very close, but his OUTFIL statement needs FNAMES=TEMP and MOD isn't needed for TEMP.
I am not sure the jcl we post are always used as a 1 step job. That's why I prefer to code DISP=(,DELETE,DELETE) instead of PASS for temp files.
But of course you know that
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
I am not sure the jcl we post are always used as a 1 step job. That's why I prefer to code DISP=(,DELETE,DELETE) instead of PASS for temp files.
Alain,
I'm not following you.
Do you mean DISP=(,CATLG,DELETE) rather than DISP=(,DELETE,DELETE)?
I used a temporary data set for T1, so DISP=(,PASS) would work even with a 2-step job.
You used DISP=(,CATLG,DELETE) for the output data set which is fine. I didn't show the DISP for the output data set - I leave the output parameters up to the person using the job to set up (for all I know they want SYSOUT=*).
If we imagine a job with several steps and a temporary data set created in the 1st step coded with a DISP=(...,PASS), that means it will live, by default, until the end of the job. A temp data set in a sort step is, almost the time, never reused in a step that comes after. If 2nd step runs for hours, that means that the space used by the temp data set in the 1st step can not be reused for an other batch that runs in parallel. In a night batch processing such resources are very sollicited.The persons who ask for a dfsort solution could not be sensitized to optimize their production this way.
A DISP=(...,DELETE) will be always changed by a DISP=(...,PASS) if the need is required, never the opposite.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Quote:
A temp data set in a sort step is, almost the time, never reused in a step that comes after.
Hmmm ... I still don't see what this has to do with my job. I coded DISP=(,PASS) for T1 which was used for the COPY operator and SELECT operator in the same step. This is very common for ICETOOL jobs. If for some reason somebody had changed this to two ICETOOL steps the T1 data set would still be needed for both steps so DISP=(,PASS) should be ok.
Whenever I show jobs with DISP=(,PASS) I only do so when they need to be passed. I always thought that was the purpose of PASS.
Quote:
A DISP=(...,DELETE) will be always changed by a DISP=(...,PASS) if the need is required, never the opposite.
Perhaps you're discussing some finer point of JCL for a more general case? Are you saying that DISP=(,DELETE) should always be used in preference to DISP=(,PASS)? Are you saying that there's something wrong with coding DISP=(,PASS) for the job I showed, or are you worried that it might lead to coding DISP=(,PASS) in other situations where it isn't appropriate?
Hmmm ... I still don't see what this has to do with my job.
Nothing at all with your job. Something if people copies/pastes it to create a multiple step job.
Code:
If for some reason somebody had changed this to two ICETOOL steps the T1 data set would still be needed for both steps so DISP=(,PASS) should be ok.
I agree, and would be DISP=(,PASS) until the last step that requires it where a DISP=(,DELETE) should be coded.
In this jcl coding DISP=(,PASS) or DISP=(,DELETE) has no incidence because it is a one step job.
Code:
Are you saying that DISP=(,DELETE) should always be used in preference to DISP=(,PASS)?
What I have seen in many shops, is that some people don't try to make things efficient.
Code:
...are you worried that it might lead to coding DISP=(,PASS) in other situations where it isn't appropriate?
It is well said. I think that people who ask for a dfsort solution could have some lakes in jcl too. They could copy the jcl posted 'as is' into their production without being gene to code a DISP=(,PASS) instead of a DISP=(,DELETE). Something I would like not.
But it's only my point of view.