Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Run the job using Internal Reader
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sanupadh

New User


Joined: 29 Jun 2010
Posts: 11
Location: chennai

PostPosted: Thu Jun 16, 2011 2:48 pm    Post subject: Run the job using Internal Reader
Reply with quote

Hi,

I have job 'A' which runs daily but sometimes abended.I need to create a job 'B' which run after the job 'A' and check if job 'A' get abended then restart it from a 5th step (step05) and also override some parameter of
job 'A'.
also repeate the process untill job 'A' run successfully.
:P
Back to top
View user's profile Send private message

vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Thu Jun 16, 2011 2:52 pm    Post subject:
Reply with quote

What if the job A never runs successfully? icon_biggrin.gif
or you accidentally make a mistake in JOB A step 5, like coding a invalid DSN name and go home for the day, then the internal reader would be like inception movie on ur mainframe, with several levels inside levels inside levels..
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1712
Location: UK

PostPosted: Thu Jun 16, 2011 2:55 pm    Post subject:
Reply with quote

What is wrong with your scheduling system?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Thu Jun 16, 2011 3:02 pm    Post subject: Reply to: Run the job using Internal Reader
Reply with quote

Can you please state, in as much detail as possible, and including the JCL for A in "code tags" (grey button that says Code), what your requirement is, rather than what you think is the solution to your requirement.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Thu Jun 16, 2011 6:15 pm    Post subject:
Reply with quote

Are you talking aout a real, a production, a practical requiremnet?
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Thu Jun 16, 2011 8:14 pm    Post subject:
Reply with quote

Hello and welcome to the forum,

For someone to be able to help, you need to answer the questions asked and provide the requested JCL.
Back to top
View user's profile Send private message
sanupadh

New User


Joined: 29 Jun 2010
Posts: 11
Location: chennai

PostPosted: Fri Jun 17, 2011 11:06 am    Post subject:
Reply with quote

job 'A' run successfully but some times it abended due to specific abend
('U0617' IN STEP 'step5') we always have to monitor it manually and check if it is abended due to 'U0617' IN STEP 'step5'. then need to restart the job from step5 with GDG (0).
We do it manually everyday.
Now my requirement is to create a monitoring job 'B' that run after 'A'
and validates its spool file and do the above work automatically.
for this, below portion I have done.

1.copied spool file of job 'A' in PS file(let it A.spool) using SARBCH utility.
2.I am checking the file A.spool for the return code of job 'A' if it is '0' then send notification mail that job 'A' run successfully.
3.if not then checking if it is abend 'U0617' IN STEP 'step5' then restart the job 'A' using Internal reader.
below is the code

//STEP08 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=ojb.library(A),DISP=SHR
//SYSUT2 DD SYSOUT=(,INTRDR)
//SYSIN DD DUMMY

now problem is it start job from step 1 but I want to start it form step5
and also I want to change the GDG(+1) to GDG(0).
GDG(+1) using in job 'A'.
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Fri Jun 17, 2011 11:34 am    Post subject:
Reply with quote

How would the second job 'B' kick off if the job A has abended?
Back to top
View user's profile Send private message
sanupadh

New User


Joined: 29 Jun 2010
Posts: 11
Location: chennai

PostPosted: Fri Jun 17, 2011 11:51 am    Post subject:
Reply with quote

we will sheduled the job B to run after A everyday.
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Fri Jun 17, 2011 11:57 am    Post subject:
Reply with quote

sanupadh wrote:
we will sheduled the job B to run after A everyday.


But if the job A doesn't complete (Fails)... Then How the job B will run?
Back to top
View user's profile Send private message
sanupadh

New User


Joined: 29 Jun 2010
Posts: 11
Location: chennai

PostPosted: Fri Jun 17, 2011 12:02 pm    Post subject:
Reply with quote

noproblem with this if it is completed or abended (fails) in both the cases
spool file will be created we have to check the spool file for jon 'A'
in case of abend job 'A' terminated with abend.
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Fri Jun 17, 2011 12:15 pm    Post subject:
Reply with quote

No that is fine... But Job B will have a dependency in the scheduler.
Back to top
View user's profile Send private message
sanupadh

New User


Joined: 29 Jun 2010
Posts: 11
Location: chennai

PostPosted: Fri Jun 17, 2011 12:43 pm    Post subject:
Reply with quote

I dont know much about scheduler but we can schedule job 'B' to run after 'A' wheather 'A' completed or terminated.
or if it is not possible then we can manually run it after 'A'
in case of manual run it can also save our time.
because checking job 'A' manually we have to follow below steps.
check job 'A' in spool .
send mail if successfull.
restart it in case of abend,again send mail .
doing above we can directly run job 'B' it will handle it.
so my problem is not that how can I schedule it but how to create it.

thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Fri Jun 17, 2011 12:52 pm    Post subject: Reply to: Run the job using Internal Reader
Reply with quote

why not use Your scheduler exception handling facilities ?

schedule job A
if everything is ok schedule the next normal job
if abend have the scheduler schedule the recovery job

if the recovery jobs succeeds schedule the next normal job
in case of error, then it is time for a manual intervention!

with a scheduler it is a bad practice to restart a job, even more in this case
where You have to skip some steps and change a dataset parameter,
a jcl restart needs a jcl change

it is better to plan in advance,
a proper scheduler setup will handle everything in a much smoother way!
for critical situations it is a normal practice to define/prepaer the related recovery jcls in order to avoid manual modifications to the original jcl
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Fri Jun 17, 2011 1:57 pm    Post subject:
Reply with quote

sanupadh wrote:
job 'A' run successfully but some times it abended due to specific abend
('U0617' IN STEP 'step5') we always have to monitor it manually and check if it is abended due to 'U0617' IN STEP 'step5'. then need to restart the job from step5 with GDG (0).
If you are so sure about the abend - why don't you work to take care about this abend itself at first place, so that it does not haapen next time?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jun 17, 2011 2:13 pm    Post subject:
Reply with quote

Anuj, shame on you for suggesting the logical approach icon_biggrin.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Fri Jun 17, 2011 2:24 pm    Post subject:
Reply with quote

LOL - actually, I had edited one more sentence for my previous reply, kinda awkward, however, I'll post it now:

PS. Is not it something like, I don't like it when my wife is angry so I look for another girl for that time; when She is normal, I get back to her... icon_neutral.gif.

No offences meant, just an effect of another book I was reading these days...
Back to top
View user's profile Send private message
sanupadh

New User


Joined: 29 Jun 2010
Posts: 11
Location: chennai

PostPosted: Fri Jun 17, 2011 2:25 pm    Post subject:
Reply with quote

Because it abends due to CICS.sometimes problem may happen in CICS region.we cant take care of that except resubmit the job
Back to top
View user's profile Send private message
sanupadh

New User


Joined: 29 Jun 2010
Posts: 11
Location: chennai

PostPosted: Fri Jun 17, 2011 2:34 pm    Post subject:
Reply with quote

Abend is due to CICS region which can be down sometimes so we cant take care of that in the JOB 'A' itself.

I heard about IEBEDIT using it we can copy(submit) job to internal reader from perticular step.
but the again problem is how can I override GDG.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Fri Jun 17, 2011 2:35 pm    Post subject:
Reply with quote

Suggest you tell us a little more about the situation at your end. Creating another Job which will look at the log file from abened or not-abended Job, does not really sound like a plan - just a patch to fix, which might blow at any time.

What would you do, if by some reason, your Job B also got failed someday?
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 -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Getting soc4 on internal table in cobol abdulrafi COBOL Programming 13 Fri May 06, 2016 3:39 pm
No new posts Skipping a record from Internal SORT Keanehelp COBOL Programming 4 Tue Jul 28, 2015 9:15 pm
This topic is locked: you cannot edit posts or make replies. How to Compare two values in an inter... ritnihi COBOL Programming 6 Wed Jun 10, 2015 11:49 am
No new posts DB2 Load using DSNUTILB with FORMAT I... yogi.47eie DB2 4 Wed May 28, 2014 4:54 pm
No new posts Array overflow on Internal table - An... scdinesh COBOL Programming 13 Thu May 22, 2014 2:55 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us