View previous topic :: View next topic
|
Author |
Message |
susi
New User
Joined: 14 Feb 2008 Posts: 5 Location: India
|
|
|
|
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 |
|
|
vasanthkumarhb
Active User
Joined: 06 Sep 2007 Posts: 275 Location: Bang,iflex
|
|
|
|
Hi,
Yes it is possible. |
|
Back to top |
|
|
susi
New User
Joined: 14 Feb 2008 Posts: 5 Location: India
|
|
|
|
thanx vasanth,
but can you let me know what if we use the SHAREOPTION(2,3) as definition of VSAM |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Yes it is possible but not recommended/advisable
( think about ... concurrent update, recovery/restart, add a few more ) |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
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 |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
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 |
|
|
susi
New User
Joined: 14 Feb 2008 Posts: 5 Location: India
|
|
|
|
Then, Does the batch module abend if the file used is taken offline by CICS module...... |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
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 |
|
|
susi
New User
Joined: 14 Feb 2008 Posts: 5 Location: India
|
|
|
|
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 |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
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 |
|
|
susi
New User
Joined: 14 Feb 2008 Posts: 5 Location: India
|
|
|
|
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 |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
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 |
|
|
|