Contenion Issues

Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Contenion Issues

Postby Jerrin Jose Thomas » Sat Jun 25, 2011 11:55 am

We are trying to avoid Contenion Issues the Jobs has over the Control card. We had the following Fix to handle this in Rexx but later realised that this is not giving us the expected results.The fix was that we have a Sleeper Process in place so that the whenever the first DISKW to Write the contents from one control card to the another fails the process goes into a sleep mode for 12 seconds and later do a Write if successful. The sleep process is set for 5 intervals of time from the first unsuccessful Write.If the contention still persists even after 60 seconds we throw an error.

When the Job ran last time there was a contention issue over the control card and the Job went to a sleep mode for 24 seconds and later altered the control card
(As per the SYSOUT ). But we later actually realised that contents were not actually written .

Can someone please suggest some possible reasons for this
Jerrin Jose Thomas
Posts: 3
Joined: Sat Mar 13, 2010 1:04 am
Has thanked: 0 time
Been thanked: 0 time

Re: Contenion Issues


Re: Contenion Issues

Postby BillyBoyo » Sat Jun 25, 2011 3:11 pm

Why is this in the Cobol forum?

We'd need a lot more information, like what "Contenion" is, how the problem is arising etc. What Jobs? What Control card.

If more than one program can have the control card, it would look like the other program did an update with the old data, probably over-writing what your program had done. You'd maybe need to work out some sort of "locking" for the Control card.
Global moderator
Posts: 3737
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 254 times

Re: Contenion Issues

Postby enrico-sorichetti » Sat Jun 25, 2011 8:25 pm

and how would be the issue COBOL related ?

wrong forum
site jargon ... Control card ...
whatever the issue the description is clear as mud
everything is sloppy

we reply on our own time
free of charge
we share our experiences with You

You should have at least the good manners to post properly
we spend time helping You solve Your issue
it is unpolite to expect us to waste time deciphering Your poor description of things

to make the most out of the questions You ask
it would be wise to read and meditate on
How To Ask Questions The Smart Way here
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
Global moderator
Posts: 2495
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 119 times

Re: Contenion Issues

Postby dick scherrer » Sat Jun 25, 2011 10:38 pm


There is no good part of the forum to talk about a sure way to harm your environment.

If you are willing to put in enough effort to completely explain what you were trying to accoplish (this may take a couple of paragraphs as well as some example(s) someone may have a suggestion. I suspect that quite a few of us have done something like you want and did not even consider this approach.

In general it is wrong to implement code that will "retry until successful".

Once you have provided enough information for someone to understand your situation, we can talk about where this might be best relocated.

Make sure you clearly explain the working of this "Control Card".
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6308
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 90 times

Re: Contenion Issues

Postby Ed Goodman » Tue Jun 28, 2011 9:25 pm

To actually answer your question... is it possible the OTHER job updated the control card after the first job finished? That way, you would see the other results instead of the "expected" results. We had that happen with a sequential file, and we thought all kinds of things were wrong until we looked at the other jobs in the logs.

How many lines are in the control card? I'm guessing it's a member of a PDS? Is there any other contention control on the jobs read/wring this member(file)? As in, do the jobs wait on each other through a scheduler?
Ed Goodman
Posts: 342
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Re: Contenion Issues

Postby Pedro » Fri Jul 08, 2011 1:46 am

whenever the first DISKW to Write the contents from one control card to the another fails the process

I think contention detection should occur prior to using the write. I think you should allocate with DISP=OLD to lock out others. Perhaps even DISP=(OLD,PASS).
Pedro Vera
User avatar
Posts: 536
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 34 times

Return to IBM Cobol