View previous topic :: View next topic
|
Author |
Message |
ANKIT GUJRATI
New User
Joined: 22 Mar 2011 Posts: 4 Location: india
|
|
|
|
i have created a panel which accept userid as input,i want it not to accept '@' as input what can i do to solve it?its only accepting '@' as special characters rest of special characters is not getting accepted which is what i want for '@' too |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
post the relevant panel definition |
|
Back to top |
|
|
ANKIT GUJRATI
New User
Joined: 22 Mar 2011 Posts: 4 Location: india
|
|
|
|
)ATTR DEFAULT(%+_)
000002 _ TYPE(INPUT) INTENS(HIGH) PAD(_)
000003 + TYPE(TEXT) INTENS(HIGH) SKIP(ON)
000004 )BODY WINDOW(70,20)
000005 +---------------------------------------------+
000006 + DATASET SEARCH SCREEN +
000007 +---------------------------------------------+
000008 +
+ USER ID(FIRST FOUR CHARACTER(A-Z) LAST TWO(0-9)): _USESID+
000010 + MAX.NO.OF DATASETS(NUMERIC(0-9)): _MD+
000011 )INIT
000012 &USESID=' '
000013 )PROC
000014 &USESID=' '
000015 VER(&USESID,NB,PICT,'AAAANN')
000016 VER(&MD,NB,PICT,'NN')
000017 )END
NOW HERE IF I GIVE INPUT AS "ID@C45" ITS ACCEPTING IT. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
if You had used the MODEL VERIFY facility
You would have seen how to specify the PICT clause
You would have seen that ISPF behaves as described
and if You had tested thoroughly You would have seen that also # and $ are accepted
for checking with more sophisticated patterns the best approach would be to do it in the calling program/script
or with an inline rexx
or (very quick and dirty) with something along the lines of
Code: |
000007 )BODY
000008 %-------------------- TITLE FOR ENTRY PANEL --------------------------
000009 %COMMAND ===>_ZCMD
000010 %
000011 + 1 2 3 4 5
000012 + 12345678901234567890123456789012345678901234567890123456
000013 + fld1 !fld1 +
000014 + fld2 !fld2 +
000015 +
000016 )INIT
000017 )PROC
000018 ver(&fld1,NB)
000019 &pref = trunc(&FLD1,4)
000020 ver(&pref,NB,ALPHAB)
000021 ver(&FLD1,PICT,'AAAANN')
000022 ver(&fld2,NB,NUM)
000023 )END
|
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Code: |
000013 )PROC
000014 &USESID=' '
000015 VER(&USESID,NB,PICT,'AAAANN') |
I believe it is always going to be blank, because of line 14. Perhaps delete line 14. |
|
Back to top |
|
|
|