Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Sat Jan 10, 2004 11:39 am Post subject:
Prayank,
In this case, mfjin's advice to try it out is NOT helpful since it won't tell you what you need to know. You can do these things, but in the case of copy, you shouldn't, and in the case of sort, you should only do it if you accept the possible consequences.
For a copy application, you should NOT use the same data set for SORTIN and SORTOUT. For copy, SORTIN reads and SORTOUT writes are done concurrently, so the writes can overlay what you're trying to read. It may work, but it may also fail or give you incorrect output.
For a sort application, you can use the same data set for SORTIN and SORTOUT. For sort, all of the SORTIN records are read before the SORTOUT writes are started, so the writes cannot overlay what you're trying to read. However, we call this a "suicide sort" because if the sort gets some kind of error before the output is complete, you may have partially overlaid the input data set making it unusable. So you should only use the same data set for SORTIN and SORTOUT if you can recover from having the SORTIN data set be unusable (for example, you have a backup of the SORTIN data set, or it's a temporary data set that you can recreate).
BTW, the SORTWKdd DDs in your copy job are not needed. Copy doesn't use work data sets. You're just wasting DASD space by using SORTWKs with copy. _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum