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
 

 

VSAM file between online and Batch

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: VSAM file between online and Batch
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: 276
Location: Bang,iflex

PostPosted: Fri Feb 15, 2008 3:24 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Fri Feb 15, 2008 4:38 pm    Post subject: Reply to: VSAM file between online and Batch
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: 2360
Location: Israel

PostPosted: Fri Feb 15, 2008 6:05 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Fri Feb 15, 2008 8:02 pm    Post subject: Reply to: VSAM file between online and Batch
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    Post subject:
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    Post subject:
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: 685
Location: Earth

PostPosted: Tue Feb 19, 2008 1:55 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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: 685
Location: Earth

PostPosted: Thu Feb 21, 2008 2:14 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fail to change physical VSAM filename... jacobdng CICS 6 Fri Jan 20, 2017 12:36 pm
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm


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