IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Validation for numeric fields, comp-3 fields char fields


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3053
Location: NYC,USA

PostPosted: Mon Mar 30, 2015 8:21 pm
Reply with quote

I have not gone through all the replies but if you have never thought of Special Names then you may wants to look into it.

Code:
SPECIAL-NAMES.
      CLASS   WS-VALID-NUM IS
              '0' THRU '9'
      CLASS   WS-VALID-CHAR IS
              'A' THRU 'I'
              'J' THRU 'R'
              'S' THRU 'Z'
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Mar 30, 2015 8:30 pm
Reply with quote

OK, that's 36 of them. What about the other 59?

Let's say that gives a total of 10 tests. The data is valid, so won't drop out early, so 10 tests per byte per record. Because there is no drop-out, same as a simple (similar) 88 user per byte.

Once you have valid data, validating again is a waste of resources and a complication in programs. You have proposed a neat way of wasting time, but it is still wasting time.
Back to top
View user's profile Send private message
kunal jain

New User


Joined: 19 May 2011
Posts: 59
Location: India

PostPosted: Sun Apr 12, 2015 2:30 am
Reply with quote

Thanks all for your expert advise / suggestions.

This site really rocks and is very useful to make the coder life easier icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Exclude rows with > than x occurre... DFSORT/ICETOOL 6
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Convert HEX to Numeric DB2 3
Search our Forums:

Back to Top