View previous topic :: View next topic
|
Author |
Message |
lvbntapasvi
New User
Joined: 20 Jul 2006 Posts: 30
|
|
|
|
I have a numeric field 9(18) in CICS. I am performing a check on this field to make sure that only numeric value is entered. Now, when I enter only 12 in the field then the message which I have coded gets populated "FIELD SHOULD BE NUMERIC". But when I enter 12 prefixed by all zeroes (to fill all the 18 places) then it accepts the value. Is there any way around in CICS thru which I can avoid this?
Thanks in advance |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
where do You have issues... in the logic or the coding ??
hint...
using reference modification scan the field until You find a non blank char
at that point check for numerics, when a new blank is found check that the rest is all blanks
in this way You will check for any alignment
data to the left ( You will skip the trailing blanks)
data to the right ( You will skip the leading blanks)
in anycase You will discard both the leading and trailing blanks |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
I think you can use JUSTIFY=(RIGHT,ZERO) for this field. |
|
Back to top |
|
|
|