View previous topic :: View next topic
|
Author |
Message |
morpheus007
New User
Joined: 27 Dec 2005 Posts: 58
|
|
|
|
We have a SORT step wherein junk characters are being removed.
We have OPTION COPY specified to copy all records and while in that process there is an OUTFIL OUTREC which replaces the junk characters with certain predetermined characters.
My doubt is if in this set up I could use the same file in the SORTIN as well as SORTOUT.At the moment it does seem to be OK but kindly advice if this is illegal or we could use it this way ie SORT the file and write to the same file ie SORTIN and SORTOUT being same. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
It is almost always a bad idea to use the same file as both input and output.
It is better to write the "new" file and after successful completion, delete the "old" file if it is no longer needed.
Until you are sure that your process does everything correctly it would be a good idea to keep the original input. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
From "z/OS DFSORT Application Programming Guide":
Quote: |
For a copy application, the SORTIN data set should not be the same as the SORTOUT data set or any OUTFIL data set because this can cause lost or incorrect data or unpredictable results.
|
|
|
Back to top |
|
|
|