An important note is that the rexx code is indentation sensitive, it must obey 
the same indentation rules as the other panel code.  Otherwise a S0C4 abend is 
nearly sure. 



Regards,
Thomas Berg
______________________________________________________
Thomas Berg   Specialist   AM/DQS   SWEDBANK AB (publ)


> -----Ursprungligt meddelande-----
> Från: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] För
> Bill Ashton
> Skickat: den 19 april 2012 13:58
> Till: IBM-MAIN@bama.ua.edu
> Ämne: Re: ISPF Panel date validation
> 
> Of course the REXX test on line 16 needs to have & instead of
> "and"...sorry
> about that!
> Billy
> 
> On Thu, Apr 19, 2012 at 7:57 AM, Bill Ashton <bill00ash...@gmail.com>
> wrote:
> 
> > Munif, you may get other answers from the ISPF group if you join
> there,
> > but here is my untested quick stab at it...
> >
> > 000013 *REXX (STRT RVK RES)
> > 000014    date1 = Date("B",strt,"U");
> > 000015    date2 = Date("B",rvk,"U");
> > 000016    If (date2 - date1 <= 90) and (date2 > date1) Then
> > 000017       res = "OK";
> > 000018    Else
> > 000019       res = "NG";
> > 000020 *ENDREXX
> > 000021
> > 000022 If (&res NE "OK")  Ver(&rvk,LEN,EQ,99,MSG=Date to far in
> > future)
> > 000024
> >
> > The Rexx will use the variables STRT and RVK from your panel, and will
> > create a result called RES. It will convert both dates to a base
> number
> > format and then compare them. It will see if RVK is 90 days or less in
> the
> > future and that RVK is further ahead than STRT, and set the result to
> "OK"
> > or "NG" depending on the test.
> >
> > Then the regular panel code will check the result switch, and if it is
> not
> > "OK" it will perform a VER that will always faill, so you can specify
> the
> > proper message number.
> >
> > Hope this works out for you.
> > Billy
> >
> >
> >
> > On Thu, Apr 19, 2012 at 6:56 AM, Terry Sambrooks <
> > terry.sambro...@btclick.com> wrote:
> >
> >> Hi Munif,
> >>
> >> Re: "I  have been requested to modify a panel to verify that user
> input a
> >> valid date (MM/DD/YY) and the
> >> input date is no more then 3 months away (roughly speaking)."
> >>
> >> REXX may provide better validation capability in this instance, but
> you do
> >> not need to exit the panel, to use REXX as it can be embedded on the
> panel
> >> itself within the PROC section.
> >>
> >> It usage is described in Chapter 7 Panel Definition Statement
> Reference in
> >> the ISPF Dialog Developers Guide and Reference.
> >>
> >> Kind Regards - Terry
> >>
> >> Director
> >> KMS-IT Limited
> >> 228 Abbeydale Road South
> >> Dore
> >> Sheffield
> >> S17 3LA
> >> UK
> >>
> >> Reg : 3767263
> >>
> >> Outgoing e-mails have been scanned, but it is the recipients
> >> responsibility
> >> to ensure their anti-virus software is up to date.
> >>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> -
> >> For IBM-MAIN subscribe / signoff / archive access instructions,
> >> send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN
> >>
> >
> >
> >
> > --
> > Thank you and best regards,
> > *Billy Ashton*
> >
> >
> 
> 
> --
> Thank you and best regards,
> *Billy Ashton*
> 
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

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

Reply via email to