Srosenfe

Schedule Last Sunday Except if Sunday EOM - Rollback

Discussion created by Srosenfe on Jan 4, 2019

Trying to schedule a job to run the last Sunday of the month EXCEPT if Sunday is end of month. If Sunday is end of month I would like it to roll back to the previous Sunday. When I tried the following if worked for every Sunday except for September and December 2019, the job gets scheduled twice - 9/22/19 and 9/29/19 and 12/22/19 and 12/29/19 just want 9/29/19 and 12/29/19. March and June 2019 should roll back to previous Sunday(3/24/19 - 6/23/19) because they are Sunday EOM.

 

------------------ CA-7 CPU JOB SCHEDULING PARAMETER EDIT ------------------
FUNCTION: LIST (ADD,DELETE,EXIT,FORMAT,LIST,REPL,SAVE,SR,SS)
JOB: DO9BBAT3 SCHID: 199 SCAL: ROLL: B INDEX: 000
DOTM LDTM SBTM ---------------------REPEAT----------------------
0805 0001 0800 INTERVAL: 0000 TYPE: COUNT: 0000 STOP: 0000

 

__ __ DAILY
__ __ WEEKLY SUN: MON: TUE: WED: THU: FRI: SAT:

__ X __ MONTHLY JAN: X FEB: X MAR: X APR: X MAY: X JUN: X
JUL: X AUG: X SEP: X OCT: X NOV: X DEC: X
WEEK: 4,5 DAY-OF-WEEK: SUN
RDAY: /-0

__ __ ANNUAL DAY:
DEFAULT SCAL: AG
__ __ SYMETRIC START: SPAN: SCHID-COUNT: 001

PROGRAM: SM72 MSG-INDX: 00 -- DB.2.1-E -- 19.004 / 11:08:59
MESSAGE: LIST FUNCTION SUCCESSFUL

 

Calendar AG:

 

* CALENDAR FOR YEAR 2019.
* DAYS SUN-SAT EXCLUDING ALL NON-WORKING AGENCY HOLIDAYS.
*
* REFER: (SCAL19AG).
*
TITLE 'CALENDAR SCAL19AG '
CALENDAR YEAR=2019,SCAL=AG,CURDATE=18004,
SCHDAYS=(WEEKDAYS,SAT,SUN),
NOSCHDY=(0101,0527,0704,0902,1128,1225),
HOLIDAY=(0101,0527,0704,0902,1128,1225)
END

Outcomes