Regarding the removal of leading zeros, how does one tell the difference 
between, for example, January 11 and November 1?  It's possible, albeit 
unlikely, that the OP is using hex notation for the month?  :-)

Rex

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Sri h Kolusu
Sent: Monday, June 11, 2018 3:27 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: [External] Re: REXX to change Date in PDS member

>>> is the date format YYMDD ?  > or Julian , yeah WTH ?

Carmen,

I am guessing that OP date format is YYMMDD but needs to  remove the
leading zero for Month (January thru September ) and the same for Day (01
thru 09). Since the year is already 18, we don't have worry about it for
another 82 years. :)

Saurabh,

You can try this

/* REXX */
"ALLOC FI(OUTDD) DA('BKP.JCL.CNTL(BKPDABD1)') SHR REUSE"

TODAY     = DATE('S')
YESTERDAY = TODAY - 1
CDAYMM    = STRIP(SUBSTR(TODAY,5,2),'L','0')
CDAYDD    = STRIP(SUBSTR(TODAY,7,2),'L','0')
YDAYMM    = STRIP(SUBSTR(YESTERDAY,5,2),'L','0')
YDAYDD    = STRIP(SUBSTR(YESTERDAY,7,2),'L','0')

LINEOUT   = 'D'                    ||,
             SUBSTR(YESTERDAY,3,2) ||,
             YDAYMM                ||,
             YDAYDD                ||,
            '<'                    ||,
            'D'                    ||,
             SUBSTR(TODAY,3,2)     ||,
             CDAYMM                ||,
             CDAYDD                ||,
            '<'                    ||,
            'VOL=SER<'
QUEUE LINEOUT
"EXECIO 1 DISKW OUTDD (FINIS"
"FREE FI(OUTDD)"


I will let you ponder about updating the stats upon updating the contents
of the member

Thanks,
Kolusu

IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> wrote on
06/11/2018 12:57:09 PM:

> From: Carmen Vitullo <cvitu...@hughes.net>
> To: IBM-MAIN@LISTSERV.UA.EDU
> Date: 06/11/2018 12:57 PM
> Subject: Re: REXX to change Date in PDS member
> Sent by: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU>
>
> is the date format YYMDD ?
> or Julian , yeah WTH ?

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


The information contained in this message is confidential, protected from 
disclosure and may be legally privileged.  If the reader of this message is not 
the intended recipient or an employee or agent responsible for delivering this 
message to the intended recipient, you are hereby notified that any disclosure, 
distribution, copying, or any action taken or action omitted in reliance on it, 
is strictly prohibited and may be unlawful.  If you have received this 
communication in error, please notify us immediately by replying to this 
message and destroy the material in its entirety, whether in electronic or hard 
copy format.  Thank you.

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

Reply via email to