Please take this with ALL it's implied humor: "OMG! Do you normally program in APL?" :-)
Al Nims Systems Admin/Programmer III UF Information Technology East Campus P.O. Box 112050 Gainesville, FL. 32611 (e) [email protected] (p) (352) 273-1298 -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Steve Horein Sent: Thursday, August 02, 2018 8:52 AM To: [email protected] Subject: Re: how to calculate previous day using REXX I know it boils down to preference or requirements, but something I have a hard time grasping: why declare so many variables? Don't I come up with the same result using this? SAY DATE('N',DATE('B')-1,'B') And understandably, the likely event is you'll want to reference the value elsewhere, so why not cut to the chase: DATEX = DATE('N',DATE('B')-1,'B') On Thu, Aug 2, 2018 at 5:56 AM Burrell, Todd <[email protected]> wrote: > This code should work for you in any circumstance: > > DATEB=DATE('B') > DATEB=DATEB-1 > DATEX=DATE('N',DATEB,'B') > SAY DATEX > > > > -----Original Message----- > From: IBM Mainframe Discussion List [mailto:[email protected]] > On Behalf Of ITschak Mugzach > Sent: Thursday, August 02, 2018 4:44 AM > To: [email protected] > Subject: Re: how to calculate previous day using REXX > > Try this logic: > > - Get the Julian date of today (YYXXX) > - Deduct 1 from Julian date (xxx) > - Last 3 digits zero? (xxx) > - Deduct one from first two chars (year) (YY) > - Decide the Julian date (365 or 366 based on year/4) (xxx) > > ITschak > > > On Thu, Aug 2, 2018 at 10:38 AM saurabh khandelwal < > [email protected]> wrote: > > > Hello Group, > > > > In REXX , we have Date function to calculate today's date but do we > > have any separate function to calculate yesterday's date. > > > > currently, we used > > > > TODAY= DATE('S') > > YESTERDAY = TODAY - 1 > > > > this code work whole month but, starting of the month where we have > > date > > > > ex : > > > > TODAY - '20180801' > > > > then yesterday will be calculated like > > > > TODAY -1 , So yesterday value will be YESTERDAY = '20180800' , > > which is wrong. > > > > Can you please help to overcome this issue. > > > > -------------------------------------------------------------------- > > -- For IBM-MAIN subscribe / signoff / archive access instructions, > > send email to [email protected] with the message: INFO > > IBM-MAIN > > > > > -- > ITschak Mugzach > *|** IronSphere Platform* *|* *Information Security Contiguous > Monitoring for Legacy **| * > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, send > email to [email protected] with the message: INFO IBM-MAIN > > > > This email transmission and any accompanying attachments may contain > CSX privileged and confidential information intended only for the use > of the intended addressee. Any dissemination, distribution, copying or > action taken in reliance on the contents of this email by anyone other > than the intended recipient is strictly prohibited. If you have > received this email in error please immediately delete it and notify > sender at the above CSX email address. Sender and CSX accept no > liability for any damage caused directly or indirectly by receipt of this > email. > > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, send > email to [email protected] with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
