MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

same file as both input and output

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
mfjin
Beginner


Joined: 26 Apr 2003
Posts: 94
Topics: 17

PostPosted: Tue Aug 31, 2004 3:54 pm    Post subject: same file as both input and output Reply with quote

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
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Thu Sep 02, 2004 9:51 am    Post subject: Reply with quote

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


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Sep 02, 2004 11:14 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group