Since the OP is trying to fit D + date into a 6-character field, why not
use a modified format like Dyyxdd, where x is a hex value for the month. In
this case, Jan = 1, Sep = 9, Oct = A, Nov = B, and Dec = C. That would make
the vol reference earlier D18611 as expected. and then if it were November
11, it would be D18B11.

The simple Rexx for this is:
xmonths = "123456789ABC";
myvalue = "D" || Left(Date("O"),2) || Substr(xmonths, Left(Date("U"),2),1)
|| Left(Date("N"),2);

On Tue, Jun 12, 2018 at 12:41 PM Gibney, Dave <gib...@wsu.edu> wrote:

> As has been pointed out, Dyymdd can not be distinguished from Dyymmd in
> all cases. Or Dymmdd. 5 digits is insufficient for any format other than
> yyddd
>
> > -----Original Message-----
> > From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On
> > Behalf Of saurabh khandelwal
> > Sent: Tuesday, June 12, 2018 9:33 AM
> > To: IBM-MAIN@LISTSERV.UA.EDU
> > Subject: Re: REXX to change Date in PDS member
> >
> > Hello  Kolusu,
> >
> > I tried to answer queries raised by different experts.
> >
> > We are looking for YYMMDD format, which is DATE('S') function in REXX
> >
> >  In my current requirement, we have JCL in place and there we are using
> tape
> > volume as date like below.
> > example  OV='D18611',
> >
> >
> > Ex : In this below DD name, from JCL should be updated with today's date
> in
> > OV='D18611'
> >
> > //IEB      PROC OV='D18611',DS='DS',LB='LB',GDG='(0)'
> >
> >
> >
> > and
> >
> >
> > Or  like below.  in DD name TAPE  with  VOL=SER=(D18611) .
> >
> >
> >
> > //TAPE     DD  DSN=RETP.DATA.QSAMCPY1,DISP=(,PASS),
> >
> > //         UNIT=359D,VOL=SER=(D18611),LABEL=(193,SL)
> >
> >
> >
> > //*=====================================
> >
> >
> > Can you please suggest, how to handle such situation and update required
> > date
> >
> > Thank you once again to help us to solve this issue.
> >
> > On Tue, Jun 12, 2018 at 6:49 PM, Sri h Kolusu <skol...@us.ibm.com>
> wrote:
> >
> > > Saurabh,
> > >
> > > You need to first answer the question about the date format.  Post
> > > detailed information on what you're trying to accomplish. Do not make
> > > people guess what you mean. This will give you a much better chance of
> > > getting a good answer to your question.
> > >
> > > As for the latest requirement, Look up PARSE and Build the entire
> > > string or use OVERLAY
> > >
> > > Thanks,
> > > Kolusu
> > >
> > > IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> wrote on
> > > 06/12/2018 02:46:02 AM:
> > >
> > > > From: saurabh khandelwal <sourabhkhandelwal...@gmail.com>
> > > > To: IBM-MAIN@LISTSERV.UA.EDU
> > > > Date: 06/12/2018 02:47 AM
> > > > Subject: Re: REXX to change Date in PDS member Sent by: IBM
> > > > Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU>
> > > >
> > > > Hello Kolusu,
> > > >
> > > > Thanks for help. This is exactly what I was looking for to code. But
> > > > I still have one doubt in this,
> > > >
> > > > Your code works only when I have empty memeber to update with
> > > > yesterday's and today's date . But how this process works, when we
> > > > updating dates in JCL like below.
> > > >
> > > > Ex : In this below DD name, from JCL should be updated with today's
> > > > date in  OV='D18611'
> > > >
> > >
> > > ----------------------------------------------------------------------
> > > 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
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>


-- 
Thank you and best regards,
*Billy Ashton*

----------------------------------------------------------------------
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