Re: 'Previous Day' system symbols (was: how to calculate previous day using REXX)

2018-08-06 Thread Paul Gilmartin
On Mon, 6 Aug 2018 11:15:06 +0100, Sean Gleann wrote:
>
>However, I wanted to go further. Having created a working REXX, I want to
>then automatically run it on a daily basis to set suitably-named system
>symbols with new values each day,
>
>I've tracked down details regarding the IEASYMU2 program, but no matter
>what I do, the result is always RC288 (or '120'x). As far as I can see,
>this is caused by some sort of RACF restriction, but there's no diagnostic
>info appearing in the console log, so I don't know what to do to correct
>the situation.
> 
o Are you running your Rexx under TSO (IKJEFT01)?
o Are you invoking the utility (specify?) with ADDRESS TSO CALL?
o Is that utility in the list of programs authorized to CALL from TSO?

(There's also a TSOEXEC that I don't understand.)

(You might try using Rexx to submit batch JCL to update the system symbols.)

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: 'Previous Day' system symbols (was: how to calculate previous day using REXX)

2018-08-06 Thread Samuel Armas
How do I unscribe?



Sam Armas

samuel.ar...@jascybersecurity.com<mailto:samuel.ar...@jascybersecurity.com>

573-823-2909



Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10




From: IBM Mainframe Discussion List  on behalf of 
Sean Gleann 
Sent: Monday, August 6, 2018 4:08:02 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: 'Previous Day' system symbols (was: how to calculate previous day 
using REXX)

Thank you, Gadi - that cracked the problem.
All is working as required now

Sean

On 6 August 2018 at 11:46, Elardus Engelbrecht <
elardus.engelbre...@sita.co.za> wrote:

> Sean Gleann wrote:
>
> >Very recently, I too went down the path of developing a REXX to figure
> out yesterday's date, and my solution pretty much matches ones that have
> been proposed in that mail-trail.
>
> >However, I wanted to go further. Having created a working REXX, I want to
> then automatically run it on a daily basis to set suitably-named system
> symbols with new values each day,
>
> >I've tracked down details regarding the IEASYMU2 program, but no matter
> hat I do, the result is always RC288 (or '120'x). As far as I can see, this
> is caused by some sort of RACF restriction, but there's no diagnostic info
> appearing in the console log, so I don't know what to do to correct the
> situation.
>
> Please post your job and parameters used.
>
> Also post the FULL messages(s) you received. If you can, can you extract
> the RACF SMF records for those failures?
>
> As documented: "All updates by IEASYMU2 are controlled by RACF facility
> class entity IEASYMUP.symbolname".
>
> Check that profile and ensure you did a proper SETROPTS REFRESH.
>
> Look at for descriptions and warnings/notes about IEASYMU2:
>
> https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.
> 0/com.ibm.zos.v2r1.ieae200/ChangingSystemSymbols.htm
>
>
> >Has anyone successfully used this program & would be prepared to share
> their experience, please?
>
> Not me for that program, we rather use automation (mostly) to get previous
> date (day, month, year) as well today (system day) and scheduling
> date/time/period.
>
> Of course, as posted a while back, I have a REXX program to write days as
> accepted by IFASMFDP program.
>
> Alternatively, just use REXX and place your dates in a datasets to be read
> by other jobs.
>
> Groete / Greetings
> Elardus Engelbrecht
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: 'Previous Day' system symbols (was: how to calculate previous day using REXX)

2018-08-06 Thread Sean Gleann
Thank you, Gadi - that cracked the problem.
All is working as required now

Sean

On 6 August 2018 at 11:46, Elardus Engelbrecht <
elardus.engelbre...@sita.co.za> wrote:

> Sean Gleann wrote:
>
> >Very recently, I too went down the path of developing a REXX to figure
> out yesterday's date, and my solution pretty much matches ones that have
> been proposed in that mail-trail.
>
> >However, I wanted to go further. Having created a working REXX, I want to
> then automatically run it on a daily basis to set suitably-named system
> symbols with new values each day,
>
> >I've tracked down details regarding the IEASYMU2 program, but no matter
> hat I do, the result is always RC288 (or '120'x). As far as I can see, this
> is caused by some sort of RACF restriction, but there's no diagnostic info
> appearing in the console log, so I don't know what to do to correct the
> situation.
>
> Please post your job and parameters used.
>
> Also post the FULL messages(s) you received. If you can, can you extract
> the RACF SMF records for those failures?
>
> As documented: "All updates by IEASYMU2 are controlled by RACF facility
> class entity IEASYMUP.symbolname".
>
> Check that profile and ensure you did a proper SETROPTS REFRESH.
>
> Look at for descriptions and warnings/notes about IEASYMU2:
>
> https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.
> 0/com.ibm.zos.v2r1.ieae200/ChangingSystemSymbols.htm
>
>
> >Has anyone successfully used this program & would be prepared to share
> their experience, please?
>
> Not me for that program, we rather use automation (mostly) to get previous
> date (day, month, year) as well today (system day) and scheduling
> date/time/period.
>
> Of course, as posted a while back, I have a REXX program to write days as
> accepted by IFASMFDP program.
>
> Alternatively, just use REXX and place your dates in a datasets to be read
> by other jobs.
>
> Groete / Greetings
> Elardus Engelbrecht
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: 'Previous Day' system symbols (was: how to calculate previous day using REXX)

2018-08-06 Thread Elardus Engelbrecht
Sean Gleann wrote:

>Very recently, I too went down the path of developing a REXX to figure out 
>yesterday's date, and my solution pretty much matches ones that have been 
>proposed in that mail-trail.

>However, I wanted to go further. Having created a working REXX, I want to then 
>automatically run it on a daily basis to set suitably-named system symbols 
>with new values each day,

>I've tracked down details regarding the IEASYMU2 program, but no matter hat I 
>do, the result is always RC288 (or '120'x). As far as I can see, this is 
>caused by some sort of RACF restriction, but there's no diagnostic info 
>appearing in the console log, so I don't know what to do to correct the 
>situation.

Please post your job and parameters used.

Also post the FULL messages(s) you received. If you can, can you extract the 
RACF SMF records for those failures?

As documented: "All updates by IEASYMU2 are controlled by RACF facility class 
entity IEASYMUP.symbolname".

Check that profile and ensure you did a proper SETROPTS REFRESH.

Look at for descriptions and warnings/notes about IEASYMU2:

https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.ieae200/ChangingSystemSymbols.htm


>Has anyone successfully used this program & would be prepared to share their 
>experience, please?

Not me for that program, we rather use automation (mostly) to get previous date 
(day, month, year) as well today (system day) and scheduling date/time/period.

Of course, as posted a while back, I have a REXX program to write days as 
accepted by IFASMFDP program. 

Alternatively, just use REXX and place your dates in a datasets to be read by 
other jobs.

Groete / Greetings
Elardus Engelbrecht

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: 'Previous Day' system symbols (was: how to calculate previous day using REXX)

2018-08-06 Thread Richards, Robert B.
And you may want to make it SYSTEM Rexx.

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Gadi Ben-Avi
Sent: Monday, August 06, 2018 6:37 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: 'Previous Day' system symbols (was: how to calculate previous day 
using REXX)

You need UPDATE access to IEASYMUP.symbolname in FACILITY.

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Sean Gleann
Sent: Monday, August 6, 2018 1:15 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: 'Previous Day' system symbols (was: how to calculate previous day 
using REXX)

Very recently, I too went down the path of developing a REXX to figure out 
yesterday's date, and my solution pretty much matches ones that have been 
proposed in that mail-trail.

However, I wanted to go further. Having created a working REXX, I want to then 
automatically run it on a daily basis to set suitably-named system symbols with 
new values each day,

I've tracked down details regarding the IEASYMU2 program, but no matter what I 
do, the result is always RC288 (or '120'x). As far as I can see, this is caused 
by some sort of RACF restriction, but there's no diagnostic info appearing in 
the console log, so I don't know what to do to correct the situation.

Has anyone successfully used this program & would be prepared to share their 
experience, please?

Regards
Sean


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: 'Previous Day' system symbols (was: how to calculate previous day using REXX)

2018-08-06 Thread Gadi Ben-Avi
You need UPDATE access to IEASYMUP.symbolname in FACILITY.

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Sean Gleann
Sent: Monday, August 6, 2018 1:15 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: 'Previous Day' system symbols (was: how to calculate previous day 
using REXX)

Very recently, I too went down the path of developing a REXX to figure out 
yesterday's date, and my solution pretty much matches ones that have been 
proposed in that mail-trail.

However, I wanted to go further. Having created a working REXX, I want to then 
automatically run it on a daily basis to set suitably-named system symbols with 
new values each day,

I've tracked down details regarding the IEASYMU2 program, but no matter what I 
do, the result is always RC288 (or '120'x). As far as I can see, this is caused 
by some sort of RACF restriction, but there's no diagnostic info appearing in 
the console log, so I don't know what to do to correct the situation.

Has anyone successfully used this program & would be prepared to share their 
experience, please?

Regards
Sean

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

.
הודעה זו נשלחה אליך מטעם חברה בקבוצת מלם תים וייתכן שהיא מוגנת תחת סודיות 
מסחרית. כל הצעה, התחייבות או מצג מטעם החברה, מחייבים מסמך נפרד וחתום על ידי 
מורשה החתימה של החברה. החברה רשאית לנטר כל תכתובת העוברת בשרתיה והיא לא תישא 
באחריות לכל נזק, ו/או אובדן, שיבוש או פגיעה במידע כלשהו שנגרם מסיבות של תקיפה 
חיצונית ו/או זדונית על הארגון.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


'Previous Day' system symbols (was: how to calculate previous day using REXX)

2018-08-06 Thread Sean Gleann
Very recently, I too went down the path of developing a REXX to figure out
yesterday's date, and my solution pretty much matches ones that have been
proposed in that mail-trail.

However, I wanted to go further. Having created a working REXX, I want to
then automatically run it on a daily basis to set suitably-named system
symbols with new values each day,

I've tracked down details regarding the IEASYMU2 program, but no matter
what I do, the result is always RC288 (or '120'x). As far as I can see,
this is caused by some sort of RACF restriction, but there's no diagnostic
info appearing in the console log, so I don't know what to do to correct
the situation.

Has anyone successfully used this program & would be prepared to share
their experience, please?

Regards
Sean

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: how to calculate previous day using REXX

2018-08-02 Thread Phil Smith III
Nims,Alva John wrote:

>Please take this with ALL it's implied humor: "OMG!  Do you normally program 
>in APL?" :-)

 

While appreciating the humor, I'd point out that nested function calls like 
that are entirely natural and accepted in Rexx. With good tracing options like

TRACE ?I 

(Intermediates) debugging such statements is not at all difficult. With 35+ 
years of Rexx use, I find Brian's illustrated example painful to read. As an 
illustration it makes sense-not criticizing you, Brian!-but if I'd posted it, I 
might have included the compressed, single-statement version as an example of 
how you'd actually use it in real life.

 

.phsiii


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: how to calculate previous day using REXX

2018-08-02 Thread Charles Mills
These were intended to be instructive answers to a question about date 
arithmetic, not examples of good Rexx coding style. Your points are of course 
correct.

Charles


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Steve Horein
Sent: Thursday, August 2, 2018 5:52 AM
To: IBM-MAIN@LISTSERV.UA.EDU
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?

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: how to calculate previous day using REXX

2018-08-02 Thread Nims,Alva John (Al)
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) ajn...@ufl.edu 
(p) (352) 273-1298

-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Steve Horein
Sent: Thursday, August 02, 2018 8:52 AM
To: IBM-MAIN@LISTSERV.UA.EDU
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  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:IBM-MAIN@LISTSERV.UA.EDU] 
> On Behalf Of ITschak Mugzach
> Sent: Thursday, August 02, 2018 4:44 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> 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 < 
> sourabhkhandelwal...@gmail.com> 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 lists...@listserv.ua.edu 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 lists...@listserv.ua.edu 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: how to calculate previous day using REXX

2018-08-02 Thread Steve Horein
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  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:IBM-MAIN@LISTSERV.UA.EDU] On
> Behalf Of ITschak Mugzach
> Sent: Thursday, August 02, 2018 4:44 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> 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 <
> sourabhkhandelwal...@gmail.com> 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 lists...@listserv.ua.edu 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 lists...@listserv.ua.edu 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: how to calculate previous day using REXX

2018-08-02 Thread Burrell, Todd
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:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of ITschak Mugzach
Sent: Thursday, August 02, 2018 4:44 AM
To: IBM-MAIN@LISTSERV.UA.EDU
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 < 
sourabhkhandelwal...@gmail.com> 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 lists...@listserv.ua.edu 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 
lists...@listserv.ua.edu 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: how to calculate previous day using REXX

2018-08-02 Thread saurabh khandelwal
Thank you so much.. this worked for us



On Thu, Aug 2, 2018 at 11:55 AM, Styles, Andy (ITS zPlatform Services) <
00d68f765d25-dmarc-requ...@listserv.ua.edu> wrote:

> Classification: Public
> say date('S', date('B') - 1 ,'B')
>
> Andy Styles
> z/Series System Programmer
>
>
> -Original Message-
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
> Behalf Of ITschak Mugzach
> Sent: 02 August 2018 09:44
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: how to calculate previous day using REXX
>
> -- This email has reached the Bank via an external source --
>
>
> 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 <
> sourabhkhandelwal...@gmail.com> 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 lists...@listserv.ua.edu 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
>
> Lloyds Banking Group plc. Registered Office: The Mound, Edinburgh EH1 1YZ.
> Registered in Scotland no. SC95000. Telephone: 0131 225 4555.
>
> Lloyds Bank plc. Registered Office: 25 Gresham Street, London EC2V 7HN.
> Registered in England and Wales no. 2065. Telephone 0207626 1500.
>
> Bank of Scotland plc. Registered Office: The Mound, Edinburgh EH1 1YZ.
> Registered in Scotland no. SC327000. Telephone: 03457 801 801.
>
> Lloyds Bank Corporate Markets plc. Registered office: 25 Gresham Street,
> London EC2V 7HN. Registered in England and Wales no. 10399850.
>
> Lloyds Bank plc, Bank of Scotland plc and Lloyds Bank Corporate Markets
> plc are authorised by the Prudential Regulation Authority and regulated by
> the Financial Conduct Authority and Prudential Regulation Authority.
>
> Halifax is a division of Bank of Scotland plc.
>
> HBOS plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in
> Scotland no. SC218813.
>
> This e-mail (including any attachments) is private and confidential and
> may contain privileged material. If you have received this e-mail in error,
> please notify the sender and delete it (including any attachments)
> immediately. You must not copy, distribute, disclose or use any of the
> information in it or any attachments. Telephone calls may be monitored or
> recorded.
>
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: how to calculate previous day using REXX

2018-08-02 Thread Elardus Engelbrecht
Brian Fraser wrote:

>If you use 'Base' then maths works without needing to worry about 0 or 
>negatives.

Indeed. And also no worries at all about Leap Year! 

I use 'Base' to feed my SMF jobs the date of today+yesterday for dumping 
purposes.

Groete / Greetings
Elardus Engelbrecht

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: how to calculate previous day using REXX

2018-08-02 Thread Brian Fraser
If you use 'Base' then maths works without needing to worry about 0 or
negatives.
/* REXX */

  TODAY = DATE('BASE')

  YESTERDAY = TODAY-1

  DAYB4 = TODAY-2

  ISODATE = DATE('STANDARD',TODAY,'BASE')

  SAY ISODATE

  ISODATE = DATE('STANDARD',YESTERDAY,'BASE')

  SAY ISODATE

  ISODATE = DATE('STANDARD',DAYB4,'BASE')

  SAY ISODATE


This gives me:
20180802
20180801

20180731

On Thu, Aug 2, 2018 at 4:44 PM ITschak Mugzach  wrote:

> 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 <
> sourabhkhandelwal...@gmail.com> 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 lists...@listserv.ua.edu 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: how to calculate previous day using REXX

2018-08-02 Thread ITschak Mugzach
Yes, I forgot to mention last step: covert Julian date to the date format
you use.

ITschak

On Thu, Aug 2, 2018 at 10:56 AM saurabh khandelwal <
sourabhkhandelwal...@gmail.com> wrote:

> Thanks for reply. But in our rexx automation, we basically need  all three
> Year , month and date. So, not sure, if I can achieve it from the logic you
> suggested before.
>
>
>
> On Thu, Aug 2, 2018 at 11:43 AM, ITschak Mugzach 
> wrote:
>
> > 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 <
> > sourabhkhandelwal...@gmail.com> 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 lists...@listserv.ua.edu 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> >
>
>
>
> --
> Thanks & Regards
> Saurabh Khandelwal
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: how to calculate previous day using REXX

2018-08-02 Thread saurabh khandelwal
Thanks for reply. But in our rexx automation, we basically need  all three
Year , month and date. So, not sure, if I can achieve it from the logic you
suggested before.



On Thu, Aug 2, 2018 at 11:43 AM, ITschak Mugzach  wrote:

> 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 <
> sourabhkhandelwal...@gmail.com> 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 lists...@listserv.ua.edu 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>



-- 
Thanks & Regards
Saurabh Khandelwal

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: how to calculate previous day using REXX

2018-08-02 Thread Styles, Andy (ITS zPlatform Services)
Classification: Public
say date('S', date('B') - 1 ,'B')

Andy Styles
z/Series System Programmer


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of ITschak Mugzach
Sent: 02 August 2018 09:44
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: how to calculate previous day using REXX

-- This email has reached the Bank via an external source --
 

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 <
sourabhkhandelwal...@gmail.com> 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 lists...@listserv.ua.edu 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Lloyds Banking Group plc. Registered Office: The Mound, Edinburgh EH1 1YZ. 
Registered in Scotland no. SC95000. Telephone: 0131 225 4555.

Lloyds Bank plc. Registered Office: 25 Gresham Street, London EC2V 7HN. 
Registered in England and Wales no. 2065. Telephone 0207626 1500.

Bank of Scotland plc. Registered Office: The Mound, Edinburgh EH1 1YZ. 
Registered in Scotland no. SC327000. Telephone: 03457 801 801.

Lloyds Bank Corporate Markets plc. Registered office: 25 Gresham Street, London 
EC2V 7HN. Registered in England and Wales no. 10399850.

Lloyds Bank plc, Bank of Scotland plc and Lloyds Bank Corporate Markets plc are 
authorised by the Prudential Regulation Authority and regulated by the 
Financial Conduct Authority and Prudential Regulation Authority.

Halifax is a division of Bank of Scotland plc.

HBOS plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in 
Scotland no. SC218813.

This e-mail (including any attachments) is private and confidential and may 
contain privileged material. If you have received this e-mail in error, please 
notify the sender and delete it (including any attachments) immediately. You 
must not copy, distribute, disclose or use any of the information in it or any 
attachments. Telephone calls may be monitored or recorded.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: how to calculate previous day using REXX

2018-08-02 Thread Gadi Ben-Avi
When I had to do date calculations in REXX, I used the information here 
http://www.rexxla.org/rexxlang/mfc/datec.html
DATE('B') returns todays date as a number of days from a date in the past. 
Subtract 1 from that and you get yesterday.
You can then use different formats of the DATE function to convert our result 
to a human readable format.

Gadi

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
saurabh khandelwal
Sent: Thursday, August 2, 2018 11:39 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: how to calculate previous day using REXX

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 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

.
הודעה זו נשלחה אליך מטעם חברה בקבוצת מלם תים וייתכן שהיא מוגנת תחת סודיות 
מסחרית. כל הצעה, התחייבות או מצג מטעם החברה, מחייבים מסמך נפרד וחתום על ידי 
מורשה החתימה של החברה. החברה רשאית לנטר כל תכתובת העוברת בשרתיה והיא לא תישא 
באחריות לכל נזק, ו/או אובדן, שיבוש או פגיעה במידע כלשהו שנגרם מסיבות של תקיפה 
חיצונית ו/או זדונית על הארגון.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: how to calculate previous day using REXX

2018-08-02 Thread ITschak Mugzach
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 <
sourabhkhandelwal...@gmail.com> 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 lists...@listserv.ua.edu 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN


how to calculate previous day using REXX

2018-08-02 Thread saurabh khandelwal
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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN