MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Incorrect day shown.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
ramy2016
Beginner


Joined: 18 Apr 2016
Posts: 46
Topics: 14

PostPosted: Tue Apr 23, 2024 8:24 am    Post subject: Incorrect day shown. Reply with quote

Hello everyone,
please help me to understand and correct the following issue. I developed a DFSORT job that checks for CUR_DAY value and raises RC=4 on Mondays to bypass certain job logic.
Worked fine in testing, but in production, when ran at 9pm Mon-Fri, it identifies the next day as CUR_DAY value, so at 9pm on Monday it shows 'TUE'.
If it's something environment related, where after a certain cutoff time it gives a next day, then I'd need to change the logic to look at the previous day, so at 9pm on Mondays it'll always give 'MON' not 'TUE'.

The job step to indentify a weekday and raise RC=4 on Mondays.

Code:
//STEP1   EXEC PGM=SORT                       
//SYSOUT   DD SYSOUT=*                 
//SYMNAMES DD *                         
CUR_DAY,S'&WDAY'                       
/*                                     
//SORTIN   DD *                         
SUNDAY
TUESDAY                                 
WEDNESDAY                               
THURSDAY                               
FRIDAY                                 
SATURDAY                               
/*                                     
//SORTOUT  DD SYSOUT=*                 
//SYSIN     DD *                       
  OPTION COPY,NULLOUT=RC4               
  INCLUDE COND=(1,3,CH,EQ,CUR_DAY)     
/*                                     
//STEP2   EXEC xxxx,COND=(4,EQ,STEP1)


And this is what I get in prod.

Code:
PROCESSING SYMNAMES STATEMENTS                                                 
ORIGINAL STATEMENTS FROM SYSIN    FOLLOW                                       
  OPTION COPY,NULLOUT=RC4                                               
  INCLUDE COND=(1,3,CH,EQ,CUR_DAY)                                     
PERFORMING SYMBOL SUBSTITUTION AS NEEDED                                       
RECORD TYPE IS F - DATA STARTS IN POSITION 1                                   
C5-NONE   C6-NONE   C7-NONE   C8-NONE   E9-NONE   C9-NONE   E5-NONE   E7-NONE   
BLOCKSET     COPY  TECHNIQUE SELECTED                                           
VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE   
- CONTROL STATEMENTS FOR 5650-ZOS, Z/OS DFSORT V2R4  - 21:00 ON MON APR 22, 2024
 OPTION COPY,NULLOUT=RC4                                                       
 INCLUDE COND=(1,3,CH,EQ,C'TUE')                                               
ICEAM1 INVOCATION ENVIRONMENT IN EFFECT - ICEAM1 ENVIRONMENT SELECTED 
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12367
Topics: 75
Location: San Jose

PostPosted: Wed Apr 24, 2024 12:26 am    Post subject: Re: Incorrect day shown. Reply with quote

ramy2016 wrote:

CUR_DAY,S'&WDAY'


Ramy2016,

You used WDAY which gives you the day of the week, based on UTC. Shown in three characters: SUN, MON, TUE, WED, THU, FRI or SAT. Use &LWDAY for local time.

Code:

&LWDAY - The day of the week, based on [b]local time[/b]. Shown in three characters: SUN, MON, TUE, WED, THU, FRI or SAT.


The system dynamic symbols are explained here.

https://www.ibm.com/docs/en/zos/3.1.0?topic=symbols-dynamic-system
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ramy2016
Beginner


Joined: 18 Apr 2016
Posts: 46
Topics: 14

PostPosted: Wed Apr 24, 2024 3:44 pm    Post subject: Reply with quote

Thanks kolusu, will try that.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group