vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hello,
I am trying to build a ISPF panel but unable to figure out how to add validation to a field.
Code: |
+ INSTREAM : $I+ <-- ENTER "Y" TO SELECT
+ ATTACHMENT : $A+ <-- ENTER "Y" TO SELECT
+ FILE EXTENSION (Eg TXT OR XLS OR RTF) :$EXT+
)INIT
.HELP = TUTORPAN
.CURSOR = EID
)PROC
VER (&I,LIST,Y,MSG=MESG001)
VER (&A,LIST,Y,MSG=MESG001)
IF (&I = 'Y' AND &A = 'Y') THEN
.MSG = MESG002
RETURN
)END |
In the above panel, the validations required are,
1) The valid value for &I or &A is Y.( The VER statement took care of this part)
2) Both &I and &A cannot contain Y at the same time(mutually exclusive)
I am unable to do the second validation mentioned above.
When this panel was executed, the MESG002 was getting displayed when no values are entered,
if &I was entered as Y and &A was blank, still the MESG002 gets displayed.
Could you please help me on this.
Thanks for viewing. |
|