IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Batch EXCI program which calls a online program


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Indrajit_57
Warnings : 1

New User


Joined: 27 Jun 2006
Posts: 60

PostPosted: Wed Jun 06, 2012 2:34 pm
Reply with quote

Hi,

I have a batch EXCI program which calls a online program to update a VSAM file (basically it adds a new record in the file). Once the updation are done the control come backs to the Batch EXCI. Then I try to read the same file (which was updated online) in batch for the new record that was added. The program abends with record not found; however the record is present in the file.

My question is that whenver the batch program starts does it takes an image of the file and it considers those set of records in the program. Any external updates that happens are not considered. If this is the case, what is the best way to handle this in the same batch EXCI program.

Thanks,
Indrajit
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Jun 06, 2012 4:43 pm
Reply with quote

Quote:
My question is that whenver the batch program starts does it takes an image of the file and it considers those set of records in the program.
Absolutely not. What is happening to you is common -- when you do a WRITE in CICS, the data is not written to the file immediately. CICS will keep the data in the buffer until it needs the buffer for another record, or something forces CICS to write the buffer out (such as closing the file, for example).

The quickest -- and easiest -- solution for your problem is to close and reopen the file in CICS after the WRITE. Your site support group, however, may have an issue with this approach since it may take up system resources to perform the close / open. And, of course, the commands are System Programming commands and may not be available to your standard CICS compile procedure. Your best bet is to explain to your site support group what your application needs to do and get them to help with an appropriate approach.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
Search our Forums:

Back to Top