generate abend based on time



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

generate abend based on time

Postby anonguy456 » Wed Jan 27, 2021 9:38 pm

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.
anonguy456
 
Posts: 1
Joined: Wed Jan 27, 2021 9:23 pm
Has thanked: 0 time
Been thanked: 0 time

Re: generate abend based on time

Postby enrico-sorichetti » Wed Jan 27, 2021 9:56 pm

Can someone please give me

a YES/NO question deserves a YES/NO answer

NO

:ugeek:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

These users thanked the author enrico-sorichetti for the post:
sergeyken (Wed Jan 27, 2021 9:59 pm)
enrico-sorichetti
Global moderator
 
Posts: 2958
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 159 times

Re: generate abend based on time

Postby NicC » Thu Jan 28, 2021 1:28 am

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3026
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: generate abend based on time

Postby Blackthorn » Fri Mar 05, 2021 9:34 pm

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.
Blackthorn
 
Posts: 128
Joined: Tue Feb 01, 2011 7:12 pm
Has thanked: 1 time
Been thanked: 9 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post