Why not just get the dynamic system symbol &WDAY.  
https://www.ibm.com/docs/en/zos/3.1.0?topic=symbols-dynamic-system

Dave Jousma
Vice President | Director, Technology Engineering





From: IBM Mainframe Discussion List <[email protected]> on behalf of 
Colin Paice <[email protected]>
Date: Thursday, April 17, 2025 at 12:41 PM
To: [email protected] <[email protected]>
Subject: Re: Day of week from a program



Except  at the end / start of day, because of leap seconds



On Thu, Apr 17, 2025, 16:49 salva <[email protected]> wrote:



> Joseph, if you have (or can get) a TOD/STCK, then:

>

> mod(stck%(4096e6*3600*24),7)  = dow based on monday = 0, sunday = 6.

>

This e-mail transmission contains information that is confidential and may be 
privileged.   It is intended only for the addressee(s) named above. If you 
receive this e-mail in error, please do not read, copy or disseminate it in any 
manner. If you are not the intended recipient, any disclosure, copying, 
distribution or use of the contents of this information is prohibited. Please 
reply to the message immediately by informing the sender that the message was 
misdirected. After replying, please erase it from your computer system. Your 
assistance in correcting this error is appreciated.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to