Dear all,
I am on ISPF ISPF 6.3.
I have a panel defined as shown below. The )BODY section uses variable ueentfdt with a normal entry field attribute. The )PROC section has a VER statement for it specifying STDDATE.
The DISPLAY is inside a rexx do forever loop (fragment below). The first time round the loop, if I enter rubbish in the field then verification prevents control from returning to rexx (that's good). If I enter 2011/01/01 then control is returned, the remaining body of the loop is executed, and the loop iterates. Control passes to DISPLAY again, and displays 2011/01/01 in the field, because the value of the vaiable hasn't changed (that's good too).
If I position the cursor under the 9th character and hit Erase End-of-Field (i.e. leave jost 2011/01/ in the field) and then hit enter, control is returned to rexx against all my expectations, and some subsequent SQL fails. Can anyone explain what I need to do for DISPLAY to recognise this as a non-valid STDDATE value?
The panel:
Code:
BROWSE PENV.LCH.SA.LIB.PANELS(UAPDENQ) - 01.23 Line 00000000 Col 001 080
Command ===> Scroll ===> CSR
********************************* Top of Data **********************************
)ATTR
/*********************************************************************/
/* */
/* Amendment log */
/* ------------- */
/* 30-Apr-2012 RM corrected attribute byte before < in comparison */
/* operation field of Entereed, Processed, Leaving */
/* 30-Apr-2012 RM Changed INIT section .help value to UAHDENQ */
/* 30-Apr-2012 RM Added this amendment log */
/*********************************************************************/
05 TYPE(PT) /* Panel title */
% TYPE(TEXT) INTENS(LOW) SKIP(ON) COLOR(WHITE)
+ TYPE(TEXT) INTENS(LOW) SKIP(ON) COLOR(BLUE)
$ TYPE(TEXT) INTENS(LOW) SKIP(ON) COLOR(GREEN)
32 TYPE(OUTPUT) COLOR(WHITE)
_ TYPE(NEF) CAPS(ON)
)BODY CMD(ZCMD) Expand({})
.{ } User Administration V1.0 - request enquiries { }
%Command ===>_ZCMD
$
$Use this screen to check%pending$or%actioned$requests
$Select the%request database$and then%any or all$of the other options.
$
%C$urrent /%A$rchive$<_Z$> (Only the%current$database exists at present)
$Requestor name.....$<_UEREQNAM $>
$DSA or CAN number..$<_UEREQID$> From yyyy/mm/dd To yyyy/mm/dd
$Entered by userid..$<_UEENTUSR$> Date Entered <_ueentfdt $> <_ueenttdt $>
$ Date Processed <_ueprofdt $> <_ueprotdt $>
$ Date of Leaving <_uedepfdt $> <_uedeptdt $>
$Userid processed...$<_UEOWNUSR$>
$Owner CEN........$<_Z $>
$Manager name.......$<_UEMGRNAM $>
$Manager CEN........$<_Z $>
$RACF environment...$<_Z $> e.g. EOCP, EOCY, SIC1 etc.
$User type..........$<_Z$> %P$Personal %F$Functional %G$Generic
$Priority...........$<_Z$> %I$Immediate%S$Scheduled
$Process status.....$<_Z$> %A$Actioned %P$Pending
$Process type.......$<_Z$> %B$Block %L$Long leave %R$Reactivation %D$Deletion
$
$Any matching requests will be displayed on the next screen.
%PF1$- HELP,%PF3$- END,%ENTER$- PROCESS
)INIT
.help = UAHDENQ
.zvars = '( uedb +
ueowncen +
uemgrcen +
ueenv +
ueutype +
ueprio +
uestat +
ueproc)'
&zcmd = &z
.cursor = &uecurs
)PROC
ver (&uedb,nb,list,C,A)
ver (&uereqnam,include,imblk,alphab)
ver (&uereqid,num)
ver (&ueentusr,name)
ver (&ueentfdt,stddate)
ver (&ueenttdt,stddate)
ver (&ueprofdt,stddate)
ver (&ueprotdt,stddate)
ver (&uedepfdt,stddate)
ver (&uedeptdt,stddate)
ver (&ueownusr,name)
ver (&ueowncen,num)
ver (&uemgrcen,num)
ver (&ueenv,name)
ver (&ueutype,list,P,F,G)
ver (&ueprio,list,I,S)
ver (&uestat,list,A,P)
ver (&ueproc,list,B,L,R,D)
)END
******************************** Bottom of Data ********************************
and the fragment of rexx is:
Code:
arg db2_subsys db2_creator ua_parmlib .
address ISPEXEC
"CONTROL ERRORS RETURN"
call initialise
do forever
"DISPLAY PANEL(UAPDENQ)"
if rc <> 0 then leave
if val_UAPDENQ() > 0 then iterate
process_rc = process_UAPDENQ()
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
I was curious and tried it... I am also on ISPF 6.3.
If I start with a bad date, such as 2012/01/44, then when the 44 is blanked out, the VER detects the problem with:
Quote:
ISPP541 VER statement failed for STDDATE. The 2-digit day entered is not within the 01-31 range for the months of January, March, May, July, August, October or December OR the 2-digit day entered is not within the 01-30 range for the months of April, June, September or November.
If I start with a good date, such as 2012/01/03, then when the 03 is blanked out, the VER does not detect the problem.
I think you should call the IBM support center and report the problem. The definition of STDDATE is pretty explicit and your example fails on the length test and on the two digit day range.
We have ISPF 6.1 and STDDATE behaves the same way:
Even on the first display, '2012/05/' passes the STDDATE validation.
Also, for those who don't know what "Iyyar" and "Nisan" are, these are months from the Jewish calendar. 5772 is the year...
"9th of Iyyar, 5772" is 1st of May 2012,
"9th of Nisan, 5772" is the 1st of April 2012
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
Quote:
Also, for those who don't know what "Iyyar" and "Nisan" are, these are months from the Jewish calendar. 5772 is the year...
"9th of Iyyar, 5772" is 1st of May 2012,
"9th of Nisan, 5772" is the 1st of April 2012