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 

Sharing externaL files

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


Joined: 04 Oct 2003
Posts: 68
Topics: 25

PostPosted: Sun Nov 27, 2005 7:02 pm    Post subject: Sharing externaL files Reply with quote

Hi,
I have multiple programs in that try to share the data using a common external file.I have a doubt regarding the sharing of the external file.The mulitple programs open the file,update it and close it but the time at which they may update the file is not fixed since the time of execution of the programs is not fixed.The order depends upon the count of records processed by each.I want to ask that if one of the program has opened the file,can we check if the file is already open ,using FILE-STATUS variable, in case some other program tries to open the same file ?

Thanks
Cobcurious
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sun Nov 27, 2005 8:04 pm    Post subject: Reply with quote

cobcurious,

Simply code DISP=OLD for the file in question and all other jobs will wait until the first job which opens the file first completes. The 2nd job will open the file and all other jobs will wait until the job completes and the cycle repeats for all the jobs

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cobcurious
Beginner


Joined: 04 Oct 2003
Posts: 68
Topics: 25

PostPosted: Sun Nov 27, 2005 8:35 pm    Post subject: Reply with quote

Thanks Kolusu,
I am running my job on Unix environment so JCL will not come in picture.So can you please suggest any solution for Unix environment ? Can FILE STATUS be handy in deciding if the file is already opened or closed by some other program ? Question

thanks again
Cobcurious
Back to top
View user's profile Send private message
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