View previous topic :: View next topic
|
Author |
Message |
chidambaram
New User
Joined: 16 Oct 2007 Posts: 11 Location: Chennai
|
|
|
|
Dears,
Can any one suggest me how we can handle the below problem.
My requirement :
I need to read a file in rexx and inside that file I need increment the count by 1.
When I am calling this rexx by the Jobs which are running parralely at same time I am facing a problem that the file is already inuse.
My rexx Pgm:
Address tso "alloc da('"inp_file"') f(indd1) shr"
if rc /= 0 then do
say 'Error in allocating the file' inp_file
return_code = 8
call exit_routine
end
Address tso "execio * diskr indd1 (finis stem" stmnm"."
if rc /= 0 then do
say 'Error in reading the file' inp_file
return_code = 8
call exit_routine
end
Address tso "execio 0 diskr indd1 (finis"
Address tso "free f(indd1)"
Chipu |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Why would you want to update a file that is being used in parallel by other programs?
Garry. |
|
Back to top |
|
|
chidambaram
New User
Joined: 16 Oct 2007 Posts: 11 Location: Chennai
|
|
|
|
My reguirement is,
If Jcl calls this rexx program then I need to increment the count by one. So that I can get a count that how many times the rexx program is used in a day.
Thanks,
Chipu |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
You need to be using DISP=OLD processing with the dataset allocation in the JCL, not in the EXEC. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I would like to know the important reason why you would need to know how many times a certain REXX is invoked daily. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
there is something that the TS wants to hide/is not telling ...
no way that the posted rexx snippet could cause an OLD disposition
maybe the script is failing because somebody else has the dataset in OLD |
|
Back to top |
|
|
|