Running same JCL in infinite loop



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Running same JCL in infinite loop

Postby pushkal2gud » Sat Apr 28, 2012 11:13 am

Hi Forum,

My requirement is to run a JCL infinite number of times. For that I am trying to use internal reader, for this the last step of my JCL is :

//STEP01 EXEC PGM=IKJEFT1A
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
SUBMIT 'NAME OF PDS(MEMBER)'
/*

This member is having the same JCL as the one which is calling it, only the jobcard name is different. At the end of the second JCL, i am putting this step again for calling the first JCL. So my JCL is running in this sequence.

JCL1 (Completed)
JCL2 (Completed)
JCL1 (JCL Error)

I don't know why the JCL1 while repeating is getting a JCL error. It might me due to same jobcard repeating again, m not sure. Can somebody help me. I am at the last step of completing my JCL.
pushkal2gud
 
Posts: 15
Joined: Fri Apr 20, 2012 7:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Running same JCL in infinite loop

Postby NicC » Sat Apr 28, 2012 12:40 pm

Why do you not find out for yourself? You are the one that has all the messages from the failed job. Go into SDSF, or your equivalent, find the RELEVANT messages, not just one that says JCL ERROR, look up anything you do not understand in the JCL Language Reference and/or User Guide and take the appropriate action. At a guess, you probably haven't set the job up for running multiple times e.g. not deleting datasets but it could be space ro anything else JCL-related. Also, you should not be doing this infinite running.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Running same JCL in infinite loop

Postby BillyBoyo » Sat Apr 28, 2012 1:22 pm

This is a very very very bad idea.

Before trying anything further, please explain what you are trying to achieve.

If you get "a job submitting itself which submits itself" it doesn't take much for it to go badly wrong, especially if you have little clue as to what you are doing.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Running same JCL in infinite loop

Postby pushkal2gud » Sat Apr 28, 2012 3:54 pm

Hi Billy, I am automating batch monitoring for my project. For this the job has to run in background all the time so that whenever a job is abended, it'll mail the concerned people. That is why I need to run it in infinite loop all the time. I hope this explains.

Hi NicC, everytime I am getting a different error message. I'll update the forum once I am done with my troubleshooting part. Thank :)
pushkal2gud
 
Posts: 15
Joined: Fri Apr 20, 2012 7:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Running same JCL in infinite loop

Postby pushkal2gud » Sat Apr 28, 2012 4:14 pm

Hi Billy/NicC,

If I can schedule this job after every 10 minutes, then running this job for infinitely won't be necessary. If any of you has idea of ESPP schedular and how to schedule a job after every 10 minutes, please let me know.

Regards
Pushkal
pushkal2gud
 
Posts: 15
Joined: Fri Apr 20, 2012 7:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Running same JCL in infinite loop

Postby BillyBoyo » Sat Apr 28, 2012 4:16 pm

There must be people at your site who support your scheduler. Talk to them.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Running same JCL in infinite loop

Postby pushkal2gud » Sat Apr 28, 2012 4:38 pm

'TEST1.PUSHKAL.PDS
SUBMIT 'TEST1.PUSHKAL.PDS(BATCH)'
IKJ56701I MISSING JOBNAME CHARACTER(S)+
IKJ56701I MISSING ONE TO SEVEN ALPHANUMERIC OR NATIONAL CHARACTERS.
IKJ56250I JOB DEVPCS9X(JOB50826) SUBMITTED READY

I am getting this JCL ERROR when submitting the JCL in the order as mentioned in the first post. Unnecessarily the JOB "DEVPCSX" is getting submitted. Can anyone tell me how to give the jobname while submitting a JCL in the code mentioned below,

//STEP01 EXEC PGM=IKJEFT1A
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
SUBMIT 'NAME OF PDS(MEMBER)'
/*
pushkal2gud
 
Posts: 15
Joined: Fri Apr 20, 2012 7:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Running same JCL in infinite loop

Postby BillyBoyo » Sat Apr 28, 2012 4:45 pm

If you don't understand what is wrong with that, I don't think it is a good idea to submit a job which submits itself. If, by accident, you got this to work but managed to duplicate the "submit" line, or somehow thought it was a good idea to have two of the jobs submitted, then you will very quickly fill your entire spool, probably necessitating a Cold Start of the system, which would not make you popular.

If you can't get basic things yet, don't submit jobs which submit themselves.

If you abandon the idea, someone can tell you what is wrong with the above.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Running same JCL in infinite loop

Postby pushkal2gud » Sat Apr 28, 2012 4:56 pm

ya i got your point Billy, thanks for the suggestion. I managed to run it and the spool was completely filled by my jobs only. I somehow managed to stop the job by opening one of the input file and then purged the job. Seriously i am not going to run it again. Thanks :)
pushkal2gud
 
Posts: 15
Joined: Fri Apr 20, 2012 7:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Running same JCL in infinite loop

Postby steve-myers » Sat Apr 28, 2012 5:03 pm

Back in February we had a user do the same stunt on a system I watch. This eventually resulted in a forced JES2 cold start. Fortunately I was able to preserve the SYSLOG before the cold start, and we 100% nailed this user from analyzing the SYSLOG. Unfortunately, the administrators of this system did not take my advise and treat this user to the guillotine or a free trip to chop chop square in Saudia Arabia. Sadly, this user is still using the system, though he has not repeated this stunt. pushkal2gud, I guarantee you that if you are caught doing this stunt at your shop you will get this treatment.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post