Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
use daylight logic in REXX

Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message

Active User

Joined: 27 Feb 2008
Posts: 108
Location: india

PostPosted: Wed Jan 30, 2019 5:08 pm    Post subject: use daylight logic in REXX
Reply with quote

I am new to Rexx. I have a rqmt to process the daylight saving in a existing program which simply sends mail to the users with date/time.

It impacts the hrs due to daylight saving.
beginning and end of daylight saving: 2nd Sunday of march & 1st Sunday of November.

current Scenario: We use EST to use SMTP to send mails

but once the daylight saving starts from 2nd Sunday of march, then we should have to use EDT time to sync, If we use EST, then we will be off by 1 hour.
May be 1st I need to fetch the 2nd Sunday from March month and 1st Sunday from November.
then need to calculate whether it falls within this daylight duration, if yes, then I can use EDT else EST.
Any suggestion/approach to achieve this.
Back to top
View user's profile Send private message


Global Moderator

Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Wed Jan 30, 2019 6:08 pm    Post subject:
Reply with quote

Your logic seems sound enough, so go for it.

You can set a base date, 1st of Month, find which day of the week it is, and work forward until you hit the relevant Sunday for that month to get the right dates. Repeat for second relevant month and associated condition.

Or rather than execute the code over and over every time that you run this thing, you could consider building a control record for the year so you only ever need to perform the calculation once a year and just compare the current date against the control record.

If current date GE lower_date_value and LE higher_date_value then use time1 else use time2.

CLUE - http://www.rexxla.org/rexxlang/mfc/datec.html

Although you are new to REXX you need to post what you have coded and the problems that you are getting rather than sit there and wait for the code.

However, for a mere 750 (+20% VAT) GBP per day I would be happy to oblige
and as I'm in such a good mood today, I'll throw in documentation for free icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1


Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts TWS PIF (EQQYCOM) Rexx - Occurrence S... Richard Baker IBM Tools 0 Wed Sep 16, 2020 10:45 am
No new posts Call Natural program with rexx shahaf CLIST & REXX 2 Tue Sep 08, 2020 11:22 am
No new posts Sync logic between VSAM files and DB2... murali.andaluri COBOL Programming 9 Tue Aug 25, 2020 1:01 pm
No new posts CA Sysview - JCL or Rexx - Read or Ex... Jasi CA Products 4 Wed Aug 05, 2020 9:19 pm
No new posts Restart logic by using cursor name in... Twinkle22 Mainframe Interview Questions 1 Wed Jul 29, 2020 11:26 am

Back to Top
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us