Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SORTIN and SORTOUT same dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: SORTIN and SORTOUT same dataset
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

Site Director


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

PostPosted: Fri Sep 21, 2007 10:39 pm    Post subject:
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 Moderator


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

PostPosted: Fri Sep 21, 2007 11:20 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us