Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to have a exclusive control for online file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
himanshu7

Active User


Joined: 28 Aug 2007
Posts: 131
Location: At Desk

PostPosted: Fri Jul 25, 2008 1:06 pm    Post subject: How to have a exclusive control for online file
Reply with quote

Hi All,

Could you please suggest,how to have exclusive control for an online file.This online file is used by two jobs one is batch job and the other Job is invoked by the transaction.
I tried using Disp=Old for the batch job but wasnt successfull as the file is used by the other job at the same time and CICS hold this online file.

Cannot use the delay.

One batch job updates the file and the other job read the file.

Kindly suggest!!

TIA

Regards
Himanshu Sharma
Back to top
View user's profile Send private message

Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri Jul 25, 2008 3:42 pm    Post subject:
Reply with quote

If CICS is using the file and you can't close it while you need exclusive control, you can't get exclusive control of the file in batch.

If a batch job updates the file you cannot have it online in CICS during the updates - a CICS update could overwrite or be overwritten by a batch update. You must close the file in CICS while batch update runs.

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

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Fri Jul 25, 2008 5:28 pm    Post subject:
Reply with quote

try these links;

http://cicswiki.org/cicswiki1/index.php?title=How_do_I_close/open_files_for_Batch_Jobs%3F

http://cicswiki.org/cicswiki1/index.php?title=CICS_24x7_Processing

http://cicswiki.org/cicswiki1/index.php?title=BatchCICS-Connect_-_24x7_Integration
Back to top
View user's profile Send private message
himanshu7

Active User


Joined: 28 Aug 2007
Posts: 131
Location: At Desk

PostPosted: Fri Jul 25, 2008 7:11 pm    Post subject: How to have a exclusive control for online file
Reply with quote

Hi,

let me try to be specific.I have two jobs which uses online file one job is the batch and runs once a day at specific time,the other job is invoked by the online pgm and it could be anytime in a day.

These both jobs uses same online file the batch job uses this file to update and the online job uses to read.

There are situations when both the jobs has run at the same time.As the disp=shr gave contention for the file and abended.
The batch job is closing and opening the file while updation.

So i thought of changing the disp=shr to old for the batchjob but when CICS was up it took the control of the file and and didnot pass this file to batch job for an half an hour so i forcefully cancelled the batch job.
Below mentioned is the contention.

" CONTENTION WITH CIPA7398(CICS REGION) OWNS SHR ON MII12
NEEDS EXCL SYSDSN COS.ONLINE.DV.GTIN.PRD300A
WAITING FOR RESOURCES FOR 27.1 MINUTES"

Could anybody tell me why CICS took the control of the file as i didnot use old for the online job,it was mentioned for the batch job.

I cannot use the delay also in the pgm.

Is there anyother option i can use please suggest!!!


Regards
Himanshu
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri Jul 25, 2008 7:47 pm    Post subject:
Reply with quote

How exactly are you closing the file in CICS? Do you CLOSE,DISABLE? Are you doing this in a step in the job or manually before running Batch?

If you run the batch program before CICS has completed the CLOSE, the batch job will find the file still OPEN - you need some delay/wait while CICS completes the CLOSE.

If you don't DISABLE, then a CICS task can automatically re-OPEN the file before the batch program issues the OPEN and/or the file is still seen as ALLOCATED to CICS. DISP=OLD will wait until nothing else has the file allocated.

Regards,
Garry.
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Fri Jul 25, 2008 10:03 pm    Post subject:
Reply with quote

IF cics file is defined as OPEN on first reference, then an online
transaction could trigger the open after you have manually closed.

file must be closed and disabled for batch usage.

Many shops have vendor software to perform this function from
batch. Check with your CICS Systems programmer.

If you don't have this type of software, then I recommend
you consider a product like www.batchcics.com
or review this for list of others;
http://www.cicsworld.com/tools/Batch
Back to top
View user's profile Send private message
himanshu7

Active User


Joined: 28 Aug 2007
Posts: 131
Location: At Desk

PostPosted: Mon Jul 28, 2008 2:18 pm    Post subject: Reply to: How to have a exclusive control for online file
Reply with quote

Hi All,

Thanks for your reply.

However the batch job has the first step to close the file but the first step itself didnot run.As it was waiting for the resource from the CICS region.Attaching the spool for the batch job for your reference.
Back to top
View user's profile Send private message
himanshu7

Active User


Joined: 28 Aug 2007
Posts: 131
Location: At Desk

PostPosted: Mon Jul 28, 2008 2:20 pm    Post subject:
Reply with quote

Hi All,

When ever the batch job runs it first closes the file,however the step didnot run.The same job is running fine when it has the disp=Shr but as i have changed the Disp=Old,The batch job was waiting for the resource from the CICS region.

Regards
Himanshu
Back to top
View user's profile Send private message
kick_support

New User


Joined: 09 Mar 2006
Posts: 2
Location: Peoria, IL

PostPosted: Fri Aug 01, 2008 8:46 pm    Post subject:
Reply with quote

Create a dummy file and add this file in both of the batch jobs with disp=old. Disp=old on the dummy file will of single-thread the batch jobs but allow you to close the "real" file to CICS.
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 Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us