View previous topic :: View next topic |
Author |
Message |
Visu Beginner
Joined: 06 May 2008 Posts: 3 Topics: 2
|
Posted: Wed May 07, 2008 9:48 am Post subject: CICS COMMAND FOR VSAM CHECK?? |
|
|
Hi,
I have CICS Online Program which is using VSAM file (it will write), and I have a Batch job which will run every 10 min which is also use same VSAM file.
I am expecting contension while the user will do CICS transaction at the same time when the Batch job is running.
I have a solution that I want to check the VSAM file in CICS program that if the VSAM file is openned it will delay the transaction for 1 min and restart the same transaction still if it is open the process will repeat.
Here is my problem how to check the job is in open state or close state, is there any comman like "CICS CHECK(VSAM1) ", Please help me.
I can chekc like READ and handle the NOOPEN Condition. But I like to know any other ways.
Please Suggest me.
Thanks,
Visu... |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Wed May 07, 2008 10:28 am Post subject: |
|
|
with the proper shr options, the file can be open in cics and also be read by batch.
1. so, the file will always be open, unless the batch job closes it in cics, which defeats your purpose. the cics transaction should always have the 'right-of-way'.
poor design to have the online wait on a batch job.
2. why every 10 minutes? what is this vsam file used for? what does the batch job do?
some more details and someone here can provide some input. but, without knowing details about the function of the vsam file and the batch job, as well as what does the cics transaction actually do..........not going to get an answer from me. _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
Visu Beginner
Joined: 06 May 2008 Posts: 3 Topics: 2
|
Posted: Wed May 07, 2008 10:49 am Post subject: |
|
|
My Online job will write Accounts into VSAM file
Batch job will Process those Accounts which are written in VSAM file and delete the Accounts before open for CICS transaction.
10 min?? My requirement is to check for account every 10 min. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed May 07, 2008 12:34 pm Post subject: |
|
|
Visu,
Since you are capable of checking if the vsam file is close or open in CICS , you can actually close the file just before the Batch process starts. Check this thread for closing the file in batch process.
http://www.mvsforums.com/helpboards/viewtopic.php?t=307&highlight=close
Add the step to close as first step and once your batch process is done , open it up once again
Hope this helps...
Cheers
Kolusu |
|
Back to top |
|
 |
Visu Beginner
Joined: 06 May 2008 Posts: 3 Topics: 2
|
Posted: Wed May 07, 2008 2:38 pm Post subject: |
|
|
Kolusu
I can handle in Batch that not a problem
While the job is Batch job is running the VSAM file will not be available to CICS
If user will do a transaction we will get Contension.
I want a CICS command to check whether the VSAM file is available for CICS or not.
eg:- CICS Inquire(VSAM1)
it should return some code open/close/availabe/not availabe
Please help me about the command
Thanks,
Visu... |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed May 07, 2008 2:58 pm Post subject: |
|
|
Visu,
Why cant you check the resp code from OPEN/READ VSAM file ?
Kolusu |
|
Back to top |
|
 |
RMi Beginner
Joined: 21 Jun 2006 Posts: 8 Topics: 0 Location: India
|
Posted: Thu Jun 05, 2008 7:45 am Post subject: |
|
|
Visu,
You can OPEN the file in the CICS program at the beginning and CLOSE it at the end so that the file will be open in CICS only when the program runs.
exec cics set
file(dummy-filename)
open / close
resp(cics-resp)
end-exec
Obviously, you will have to handle file open error in both batch and online programs.
Regards,
RMi |
|
Back to top |
|
 |
RMi Beginner
Joined: 21 Jun 2006 Posts: 8 Topics: 0 Location: India
|
Posted: Thu Jun 05, 2008 7:47 am Post subject: |
|
|
Visu,
You can OPEN the file in the CICS program at the beginning and CLOSE it at the end so that the file will be open in CICS only when the program runs.
exec cics set
file(dummy-filename)
open / close
resp(cics-resp)
end-exec
Obviously, you will have to handle file open error in both batch and online programs.
Regards,
RMi |
|
Back to top |
|
 |
|
|