View previous topic :: View next topic |
Author |
Message |
mfjin Beginner
Joined: 26 Apr 2003 Posts: 94 Topics: 17
|
Posted: Tue Aug 31, 2004 3:54 pm Post subject: same file as both input and output |
|
|
I have a sas pgm that reads an input declared as disp=shr . eliminates a few records based on a particular condition and writes them to an output. Now this output is same as the input but declared as disp=old in the jcl
What I mean is
input : xyz.abc.def,disp=shr
output: xyz.abc.def,disp=old
this pgm has been failing with the error 'file in use'. Is this usage wrong? |
|
Back to top |
|
 |
Bill Dennis Advanced

Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
|
Posted: Thu Sep 02, 2004 9:51 am Post subject: |
|
|
If it's failing, then it must be wrong! I've seen SORTIN/SORTOUT used in this manner but the SORT pgm does special deallocation of SORTIN prior to opening SORTOUT. Apparently SAS does not do this. It's dangerous anyway because there is no recovery/restart once the output begins to be rewritten.
Regards,
Bill |
|
Back to top |
|
 |
Frank Yaeger Sort Forum Moderator

Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
Posted: Thu Sep 02, 2004 11:14 am Post subject: |
|
|
Quote: | the SORT pgm does special deallocation of SORTIN prior to opening SORTOUT |
To clarify:
DFSORT does NOT deallocate the SORTIN. For a SORT operation, DFSORT does NOT do parallel processing on the input and output data sets, so it's ok to use the same data set for input and output, provided you can recover the data set in case of an error. For a COPY or MERGE operation, DFSORT does do parallel processing on the input and output data sets so the same data set should NOT be used for input and output. _________________ 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 |
|
Back to top |
|
 |
|
|