Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 10256
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: 1228
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 Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us