View previous topic :: View next topic
|
Author |
Message |
manugeorge2004
New User
Joined: 17 Jun 2009 Posts: 38 Location: Denver
|
|
|
|
I have a job which submits batch CA7 control cards. But on a specific day (Christmas) ,I want a different card to execute ( I dont want couple of CA7 commands to execute).
Is there a way in JCL where I can test in IF THEN statements to check for MMDD of current date and execute a different step.
If thats not possible, Can I filter out couple of statements from my CA7 control card based on current date. Basically, I have control card like below
Line1
Line2
Line3
Line4
I want to filter out Line3 only on Christmas day. Nothing in the content will tell me about date.
Line1
Line2
Line4 |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2154 Location: USA
|
|
|
|
There is no such way in neither JCL, nor VSAM.
Try to think about SORT, REXX... approach
P.S.
None of Line1.....Line4 can be executed as any command in any environment... |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
You might be able to do this with CA7 DRIVER but it's been 7 years since I've had access to CA7 so I don't know for sure. Find the CA7 DRIVER manual and read up on it. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Why not have 2 jobs - one to run on Christmas day and the other to run the rest of the time? |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 592 Location: London
|
|
|
|
You have calendars in CA7, and can schedule with different CA7 JCL Include statements according to the calendar. So on Xmas day the include statement may bring in a SYSIN statement or PARM with different criteria.
Failing that you could have a rexx step that checks the day and generates a specific RC for Xmas day, which means subsequent steps may execute or not, based on the RC out of the rexx step. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1348 Location: Bamberg, Germany
|
|
|
|
manugeorge2004 wrote: |
Is there a way in JCL where I can test in IF THEN statements to check for MMDD of current date and execute a different step. |
You can try something like this:
Code: |
//*
//* - An IF statement specified before the first EXEC statement
//* in a job is not evaluated before the first step executes.
//*
//INIT EXEC PGM=IEFBR14
// IF (&LDAY. EQ 25 AND &LMON. EQ 12) THEN
//XMAS EXEC PGM=IEFBR14
// ELSE
//OTHER EXEC PGM=IEFBR14
// ENDIF |
|
|
Back to top |
|
|
|