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

how to check the length of a field


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sm_2009

New User


Joined: 10 May 2009
Posts: 72
Location: bangalore

PostPosted: Fri Jun 12, 2009 6:55 pm
Reply with quote

hi all

i have declared a variable as var1 pic 9(9) value zeroes.

it should be always 9 digits.

i have to validate the keyed input value as 9 digit not less than this.

how can i check...pls suggest
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Jun 12, 2009 7:04 pm
Reply with quote

Code:
IF  VAR1 NOT NUMERIC
    <put error message>
    ELSE
        IF  VAR1 < 100000000
            <put error message>
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts VB to VB copy - Full length reached SYNCSORT 8
Search our Forums:

Back to Top