Schedule any JCL program at a specific time



Ask queries about other IBM Tools like Tivoli, COBTEST, Fault Analyzer, z/OS File Manager, Workload Simulator, APA, SCLM, Merge & Migration Tools etc...

Re: TWS job scheduling

Postby Blackthorn » Wed Mar 05, 2014 4:18 pm

Case code NOAR includes JCL errors, so that is why your first example is not working.

The statement you have for the return code 16 looks ok on the face of it, although it might be useful if you could post the JCL and job output. What happens if you remove the STEPCODE parameter from that job? Is Automatic Recovery then invoked when you get a return code of 16?
Blackthorn
 
Posts: 98
Joined: Tue Feb 01, 2011 7:12 pm
Has thanked: 0 time
Been thanked: 2 times

Re: Re: TWS job scheduling

 

Re: TWS job scheduling

Postby apru » Wed Mar 05, 2014 4:31 pm

Thanks Blackhorn.How to exclude jcl errors from EXCLUDECC??.Will definitely check what you told and get back to you...thanks a ton for clearing my doubts.....
apru
 
Posts: 34
Joined: Mon Feb 10, 2014 9:13 pm
Has thanked: 1 time
Been thanked: 0 time

Re: TWS job scheduling

Postby Blackthorn » Wed Mar 05, 2014 4:41 pm

It depends which errors you do want excluded from Automatic Recovery. The easiest way would be to specify EXCLUDECC=SYST which will point to the other IBM supplied case code module which only includes S222 abends. Otherwise you need to create your own case code module which includes the errors you want excluded.

Read the "Creating case-code-definition modules" section on the Customization & Tuning manual.
Blackthorn
 
Posts: 98
Joined: Tue Feb 01, 2011 7:12 pm
Has thanked: 0 time
Been thanked: 2 times

Re: TWS job scheduling

Postby apru » Thu Mar 06, 2014 11:26 am

This is the code in which I tried to implement automatic recovery

// job card
//*%opc recover errstep=step010,stepcode=16,restart=n,addappl=spl
//step010 exec pgm=sort
//sortin dd dsn=id.name
// disp=shr
/sortout dd dsn=id.name2
// disp=shr
//sysprint
//sysout
//sysin
sort fields =( , , , ,)
/*
//

output: -> Job status continues to be in E state
-> NO AUTOMATIC RECOVERY BECAUSE RECOVER STATEMENT DOES NOT MATCH THIS ERROR
******************************************************************************************************************************************************************
apru
 
Posts: 34
Joined: Mon Feb 10, 2014 9:13 pm
Has thanked: 1 time
Been thanked: 0 time

Re: TWS job scheduling

Postby apru » Thu Mar 06, 2014 12:02 pm

One more thing.I have created the application provided in ADDAPPL parameter.The occurrence for this application in current plan will be automatically created by tws when automatic recover statements are executed right???
apru
 
Posts: 34
Joined: Mon Feb 10, 2014 9:13 pm
Has thanked: 1 time
Been thanked: 0 time

Re: TWS job scheduling

Postby Blackthorn » Thu Mar 06, 2014 6:07 pm

I've tried eaxactly the same auto recovery statement and it works for me -

//*>OPC RECOVER ERRSTEP=STEP010,STEPCODE=16,RESTART=N,ADDAPPL=SPL
//* OPC MSG:
//* OPC MSG: I *** R E C O V E R Y A C T I O N S T A K E N ***

I can only suggest that you're not getting a code 16 from your job (what code does TWS show you after it has failed if you browse the job in 5.3?) or you have amended your case code NOAR to include a code 16 which seems unlikely.

And yes, the application you have created will be added to the current plan when the recovery actions are taken.
Blackthorn
 
Posts: 98
Joined: Tue Feb 01, 2011 7:12 pm
Has thanked: 0 time
Been thanked: 2 times

Re: TWS job scheduling

Postby apru » Fri Mar 07, 2014 9:15 am

Hi..today morning I attempted the program again..when it ended in error,I used option 5.3.The status of operation is ENDED IN ERROR JCLI...
apru
 
Posts: 34
Joined: Mon Feb 10, 2014 9:13 pm
Has thanked: 1 time
Been thanked: 0 time

Re: TWS job scheduling

Postby Blackthorn » Fri Mar 07, 2014 2:59 pm

That's why your automatic recovery is not working then. You need to fix the cause of your JCLI error.
Blackthorn
 
Posts: 98
Joined: Tue Feb 01, 2011 7:12 pm
Has thanked: 0 time
Been thanked: 2 times

Re: TWS job scheduling

Postby apru » Wed Mar 12, 2014 12:09 pm

Hi

Using the option9 in OPC panel (SERVICE FUNC),I deleted the current plan.Then I extended the current plan ,created an application and added an occurrence of the application to the current plan through option 5(MCP).But the application is remaining in waiting state and not getting started.When I asked the scheduling team,they asked me to use the replan option.But I didnt understand the purpose of this...Should any other step be performed after deleting current plan and extending it.????
apru
 
Posts: 34
Joined: Mon Feb 10, 2014 9:13 pm
Has thanked: 1 time
Been thanked: 0 time

Re: TWS job scheduling

Postby Blackthorn » Wed Mar 12, 2014 1:04 pm

Well, for a start you shouldn't need to delete the current plan. You would never do this in a production system and indeed I would be concerned if you even had access to do it. Having said that, if this is a testing system that doesn't run any real work, then you could do that if you wanted to replan the current planning period. But if you've added the schedule in manually all of this is irrelevant, there is no need to do anything else to get the schedule added to the current plan.

If the application is there but it has a status of waiting, you need to determine why this is. What is the status of the first operation? You seem to be trying to run before you can walk - automatic recovery statements and service functions are relatively advanced topics - determining why a application is not running is one of the most basic.
Blackthorn
 
Posts: 98
Joined: Tue Feb 01, 2011 7:12 pm
Has thanked: 0 time
Been thanked: 2 times

PreviousNext

Return to Other IBM Tools

 


  • Related topics
    Replies
    Views
    Last post