IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ca 11 restart but get new generations?


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Thu Mar 13, 2008 4:01 pm
Reply with quote

Here's the situation at our shop:
Lots of jobs write to the same gdg base. By lots, I mean 300+. The problem we have is that when one of those abends and another one runs before the abended job is restarted. In this case, a generation is overwritten. I'm curious if there is a way to tell it to restart but get new generations.

So...
1. joba is creating +1(G0006V00) and abends in step3.
2. while joba is down, jobb runs and also creates +1(G0006V00) and runs to completion.
3. abend for joba is resolved and joba is restarted in step3, creates +1(G0006V00) overwriting the +1(G0006V00) jobb just created, and runs to completion.
4. doh! the generation jobb created is gone.

Is there a way to tell CA to restart in step3 but don't use G0006V00, use whatever is now the proper +1? That's be G0007V00 in this case.

Currently, we have a means to check after the fact if any generations were overwritten and we just process those again. We're thinking of splitting this into two jobs. The first will write to flat file and the 2nd will copy to gdg. While we'd still have the possibility of overwriting a generation, the occurances would be much fewer since the copy step hardly ever abends.

But I'd like to know if we could somehow be smarter about how we restart in the event of an abend before we go splitting 300+ jobs into 2.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri Mar 14, 2008 12:09 am
Reply with quote

Hi,

jasorn wrote:
In this case, a generation is overwritten.
GDGs are not meant for this type of processing. New GDG should be created.

Quote:
3. abend for joba is resolved and joba is restarted in step3, creates +1(G0006V00) overwriting the +1(G0006V00) jobb just created, and runs to completion.
If abend is in step 3, with default DISP =(,,DELETE) GDG should be deleted, so next JOB cann't use G0006V00 to 'overwrite', I'm still not sure what is 'overwrite'. Does the program using these GDGs checks for some 'entries' in the GDG, in case of an abend, and f 'entries' are present re-write them(perhaps this is over write).

Quote:
Is there a way to tell CA to restart in step3 but don't use G0006V00, use whatever is now the proper +1? That's be G0007V00 in this case.
Can't You put a dependency on successor JOBs to wait for a good run of the predecessors JOBs?.. You've CA-11 after all.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Mar 14, 2008 5:07 am
Reply with quote

Hello,

If the job only creates one +1 generation per run, you could simply create the actual +1 as the last step of the job.

A good overall solution is to modify the process so that the +1 from an abended execution is never preserved. That way, there is no concern about over-writing.
Back to top
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Fri Mar 14, 2008 5:49 am
Reply with quote

I must not have presented the situation clearly. Let me try again.

First to address Dick's suggesting that the generation from an abended execution isn't preserved.

As the below explains, it's not being preserved. But upon restart the CMT still has the old g00v00 number which is no longer valid.

Now the a restating of the situation.

(Reading the replies, I'm guessing the confusion is in thinking JOBA and JOBB are 2 different instances of the same job. They're not. They are 2 completely different jobs but write their outputs to the same gdg base.)

The jobs
JOBA
. some steps that do stuff so that a complete rerun isn't disirable.
.
.
.
STEP21 - Create FILEA
STEP22 - Copy FILEA to GDG.DATASETC(+1) <=== Note: same GDG base as JOBB

JOBB
STEP1 - Create FILEB
STEP2 - Copy FILEB to GDG.DATASETC(+1) <=== Note: same GDG base as JOBB

The flow of the situation in question
(0) generation = GDG.DATASETC.G00007V00
1. JOBA abends in STEP21. +1 generation isn't created but the CMT knows G00008V00 is the one it's going to create.

2. JOBA is still down when JOBB starts.

3. JOBB runs successfully. Since the (0) generation is GDG.DATASETC.G00007V00, it creates GDG.DATASETC.G00008V00.

4. The issue causing JOBA's abend is resolved and JOBA is restarted in STEP21. This is the issue. The CMT thinks G00008V00 is still the (+1) generation. It's not as JOBB created G00008V00, before JOBA was restarted.

5. The restarted JOBA runs to end of job successfully. Since the CMT thinks G00008V00 is the (+1) generation, the restarted JOBA copied FILEB to GDG.DATASETC.G00008V00 instead of G00009V00 and overwrote the GDG.DATASETC.G00008V00 that JOBB created while the abend of JOBA was being resolved.

So, the question is can we tell ca11 in step 4 to restart but to create G00009V00 instead of overwriting G00008V00?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Mar 14, 2008 7:58 am
Reply with quote

Hello,

Quote:
They are 2 completely different jobs but write their outputs to the same gdg base
Understood (and this is a rather common requirement).

Quote:
So, the question is can we tell ca11 in step 4 to restart but to create G00009V00 instead of overwriting G00008V00?
I'm not familiar enough with ca-11 to answer, but i would think this an issue with many jobs at ca-11 sites. I don't recall this previously being posted as a problem in the forums.

Do these jobs run very long? I expect not as there are so many per day. Might it be possible to resubmit the job rather than restarting? There may be a way to "toss" the abended run which would eliminate the generation from the problem job. Resubmitting would start fresh and +1 should be valid/correct.
Back to top
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Fri Mar 14, 2008 10:56 am
Reply with quote

Dick,
For lots of reasons, resubmitting isn't desirable.

Restarting but clearing the cmt is what we really want. If that's not possible, we have the workaround of waiting until all the generations are deleted(we copy them and delete them twice a day) At that time, restarting is fine because since the generation it thinks it should create doesn't exist, it gets a correct g00v00 number.

I just figured this would be a common enough situation, there must be a parm to pass ca11 to tell it to clear the cmt. And I don't remember having this issue at other shops so there must be some good solution.

Guess it's time to look at the manual icon_smile.gif
Back to top
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Fri Mar 14, 2008 11:07 am
Reply with quote

Quote:
Can't You put a dependency on successor JOBs to wait for a good run of the predecessors JOBs?.. You've CA-11 after all.

Actually, no. The jobs aren't predecessors or successors of one another. They just write to the same gdg base.
Back to top
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Fri May 16, 2008 4:11 pm
Reply with quote

fyi, here's what i settled on.

After a lot of searching and talking to experts here is an approach that seems to work.

First a side note. The systems guy who deals with ca-11 at our shop told me he doesn't know of a way to prevent generations from being overwritten in this situation and he's even requested modifications with ca and their response was we shouldn't have multiple jobs writing to the same gdg base in this manner.

Anyway here's how I handled this situation.

1. Before writing data to the +1 generation copy an empty dataset to the +1 generation. This is similar to touching a file in unix. I used disp=(mod,catlg,catlg) for this. This step is important because if there wasn't an abend, the +1 generation wouldn't exist and step 2 would get a jcl error.

2. Check the +1 generation to see if it's empty. Since I just touched it, should be empty if we can use it or have data if another job created it while this job was down.

3. If the +1 generation has data, it can't be used so I try an arbitrary generation. I chose the +111 generation. I decided to check if it's empty after touching it as described above and if it's empty use it. If it's not empty I take an abend rather that repeat this cycle as this situation would be highly unlikely and probably should have human intervention.

4. If the +1 generation is empty, it can be written to using disp=(old,catlg,delete)

This is the ONLY solution I could think of and nobody offered anything to accomplish this without maintaining a schedule that would be cumbersome for us to maintain or doing something like splitting these jobs up into one that writes to flat and then another one that copied to gdg.

Using the scheduler is problematic in that these are predecessor/successors of one another and there are enough that we exceed the limit on conflicts.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Rexx to list generations of GDGs and ... CLIST & REXX 3
No new posts IMS Restart Failure IMS DB/DC 4
No new posts Restart logic by using cursor name in... DB2 1
No new posts Do we need to restart DB2 Z/OS for DA... DB2 0
No new posts Control-M restart instruction CA Products 2
Search our Forums:

Back to Top