Page 1 of 2

Running same JCL in infinite loop

PostPosted: Sat Apr 28, 2012 11:13 am
by pushkal2gud
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.

Re: Running same JCL in infinite loop

PostPosted: Sat Apr 28, 2012 12:40 pm
by NicC
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.

Re: Running same JCL in infinite loop

PostPosted: Sat Apr 28, 2012 1:22 pm
by BillyBoyo
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.

Re: Running same JCL in infinite loop

PostPosted: Sat Apr 28, 2012 3:54 pm
by pushkal2gud
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 :)

Re: Running same JCL in infinite loop

PostPosted: Sat Apr 28, 2012 4:14 pm
by pushkal2gud
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

Re: Running same JCL in infinite loop

PostPosted: Sat Apr 28, 2012 4:16 pm
by BillyBoyo
There must be people at your site who support your scheduler. Talk to them.

Re: Running same JCL in infinite loop

PostPosted: Sat Apr 28, 2012 4:38 pm
by pushkal2gud
'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)'
/*

Re: Running same JCL in infinite loop

PostPosted: Sat Apr 28, 2012 4:45 pm
by BillyBoyo
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.

Re: Running same JCL in infinite loop

PostPosted: Sat Apr 28, 2012 4:56 pm
by pushkal2gud
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 :)

Re: Running same JCL in infinite loop

PostPosted: Sat Apr 28, 2012 5:03 pm
by steve-myers
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.