Page 1 of 1

generate abend based on time

PostPosted: Wed Jan 27, 2021 9:38 pm
by anonguy456
Hi All,
Can someone please give me a JCL which will actually check if the submit time/current time is between 1:00AM - 5:00AM. if the job is submitted in this time it should abend by setting maxcc to 8.

Re: generate abend based on time

PostPosted: Wed Jan 27, 2021 9:56 pm
by enrico-sorichetti
Can someone please give me

a YES/NO question deserves a YES/NO answer

NO

:ugeek:

Re: generate abend based on time

PostPosted: Thu Jan 28, 2021 1:28 am
by NicC
The answer is NO because that is not what JCL does. You need a program. Also, setting maxcc to 8 is not going to cause an abend - it will only cause that step to give a return code of 8.

Re: generate abend based on time

PostPosted: Fri Mar 05, 2021 9:34 pm
by Blackthorn
Depending on the scheduler you use, you could potentially do it with variables.

So, with TWS for example, the &CHH variable resolves to the current time. Using that in conjunction with INCLUDE statements would allow you to either execute your desired job, or some program which would abend, depending on the current time.