IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SORTIN and SORTOUT same dataset


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
morpheus007

New User


Joined: 27 Dec 2005
Posts: 58

PostPosted: Fri Sep 21, 2007 10:12 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Sep 21, 2007 10:39 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Sep 21, 2007 11:20 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
Search our Forums:

Back to Top