generate abend based on time

JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...
anonguy456
Posts: 4
Joined: Wed Jan 27, 2021 9:23 pm
Skillset: beginner
Referer: through search

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.

enrico-sorichetti
Global moderator
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
Referer: www.ibmmainframes.com

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

NicC
Global moderator
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
Referer: Google
Location: Pushing up the daisies (almost)

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

Blackthorn
Posts: 130
Joined: Tue Feb 01, 2011 7:12 pm
Skillset: JCL, TWS, IBM Utilities
Referer: Found on web

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.


  • Similar Topics
    Replies
    Views
    Last post