Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Validation on a numeric field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
lvbntapasvi

New User


Joined: 20 Jul 2006
Posts: 30

PostPosted: Sun Jan 03, 2010 11:57 am    Post subject: Validation on a numeric field
Reply with quote

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
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Sun Jan 03, 2010 1:23 pm    Post subject: Reply to: Validation on a numeric field
Reply with quote

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
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1243
Location: Israel

PostPosted: Sun Jan 03, 2010 10:48 pm    Post subject:
Reply with quote

I think you can use JUSTIFY=(RIGHT,ZERO) for this field.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts JES2 job size field matching Windows ... SRICOBSAS All Other Mainframe Topics 4 Tue Sep 05, 2017 5:49 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us