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

VSAM file between online and Batch


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
susi

New User


Joined: 14 Feb 2008
Posts: 5
Location: India

PostPosted: Fri Feb 15, 2008 2:43 pm
Reply with quote

Hi,
Anybody please tell me whether the VSAM file can be shared by both online and batch program provided the file definition is
SHAREOPTION(3,3) .
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Fri Feb 15, 2008 3:24 pm
Reply with quote

Hi,

Yes it is possible.
Back to top
View user's profile Send private message
susi

New User


Joined: 14 Feb 2008
Posts: 5
Location: India

PostPosted: Fri Feb 15, 2008 3:32 pm
Reply with quote

thanx vasanth,
but can you let me know what if we use the SHAREOPTION(2,3) as definition of VSAM
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Fri Feb 15, 2008 4:38 pm
Reply with quote

Yes it is possible but not recommended/advisable
( think about ... concurrent update, recovery/restart, add a few more )
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Fri Feb 15, 2008 6:05 pm
Reply with quote

How about consulting the fine manual?

O.
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Fri Feb 15, 2008 7:57 pm
Reply with quote

share option (2,3) does not permit updating from
both batch and cics.

If the file is open in CICS, you will need to close the file in CICS,
before running batch update.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10888
Location: italy

PostPosted: Fri Feb 15, 2008 8:02 pm
Reply with quote

Quote:
If the file is open in CICS, you will need to close the file in CICS,
before running batch update.


not enough...
depending on the environment You might need to ... switch logs ( for example )
if You have some kind of cics vsam forward recovery, after a batch update
everything will be messed up...
and so on and so on

the advice ! review the application in order to get rid of the situation
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Fri Feb 15, 2008 8:19 pm
Reply with quote

enrico,

Your right, if using cics vsam forward recovery, then could cause problems
if needed to recover updates.


However, many shops do not use cics vsam forward recovery,
and just close file in CICS, then run batch update without any problems
to the file

OR
they may have some vendor software that allows for concurrent
updating of CICS files from batch, without closing file.
Back to top
View user's profile Send private message
susi

New User


Joined: 14 Feb 2008
Posts: 5
Location: India

PostPosted: Tue Feb 19, 2008 1:31 pm
Reply with quote

Then, Does the batch module abend if the file used is taken offline by CICS module......
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Tue Feb 19, 2008 1:55 pm
Reply with quote

In a system which I have worked a year before, the process was to activate another set of replica vsam files for on the CICS region. Batch cycle will run with the original set of files.
After batch update files were changed back. Update facility on all the screens was disabled during the batch cycle, so that only read only operations were done on the CICS region which used replica files.
Back to top
View user's profile Send private message
susi

New User


Joined: 14 Feb 2008
Posts: 5
Location: India

PostPosted: Wed Feb 20, 2008 11:33 am
Reply with quote

In my batch program,
I need to just read the file(no update), which had been taken offline by another CICS module.In this case, will the Batch module abends with the bad return code.
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Thu Feb 21, 2008 5:37 am
Reply with quote

When you say taken offline, you mean the file has been closed
in cics,
then your batch program should read ok.
in addition,
if share option 2,3 you should be able to read the
file from batch without problems even when file is open in cics
Back to top
View user's profile Send private message
susi

New User


Joined: 14 Feb 2008
Posts: 5
Location: India

PostPosted: Thu Feb 21, 2008 8:07 am
Reply with quote

Sorry if i had i not mentioned properly.
Here The VSAM file has been defined as SHAREOPTION(3,3).
And the file is been delete/define by another job, during when the batch module tried to access VSAM.In this case will the batch module abends.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Thu Feb 21, 2008 2:14 pm
Reply with quote

Option (3,3) is less restrictive than (2,3) so it will allow update from batch and online.
Quote:
will batch module abends?

It should not abend because of sharing violation.If you have any other problem in the program then it has many reasons to abend.

In your last post you mentioned like "one job was trying to access file when other job is delete-defining the same file?" please let us know if I got your question right.
In this case if file is open in CICS or Batch is using the file then you wont be able to delete it in the first place.
If it is not being used then delete define will finish first and after that any program access will be possible.

give us the details about the abend if you got any.
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts MacKinney Batch to CICS upgrade causi... CICS 7
No new posts Run rexx in batch job CLIST & REXX 7
No new posts Unable to interpret a hex value to De... COBOL Programming 7
No new posts Excuting store procedure via JCL batch JCL & VSAM 1
No new posts SORT on detail record, then repeat he... DFSORT/ICETOOL 3
Search our Forums:

Back to Top