Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Problem in reading a file while Jobs are in parallel run

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
chidambaram

New User


Joined: 16 Oct 2007
Posts: 11
Location: Chennai

PostPosted: Fri Nov 20, 2009 2:44 pm    Post subject: Problem in reading a file while Jobs are in parallel run
Reply with quote

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

Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri Nov 20, 2009 3:01 pm    Post subject:
Reply with quote

Why would you want to update a file that is being used in parallel by other programs?

Garry.
Back to top
View user's profile Send private message
chidambaram

New User


Joined: 16 Oct 2007
Posts: 11
Location: Chennai

PostPosted: Fri Nov 20, 2009 3:04 pm    Post subject:
Reply with quote

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

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Fri Nov 20, 2009 3:48 pm    Post subject: Reply to: Problem in reading a file while Jobs are in parall
Reply with quote

You need to be using DISP=OLD processing with the dataset allocation in the JCL, not in the EXEC.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Nov 20, 2009 4:16 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Fri Nov 20, 2009 4:17 pm    Post subject: Reply to: Problem in reading a file while Jobs are in parall
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us