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

Length of Alpha numeric field/string in Easytrieve


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kitts

New User


Joined: 29 Jan 2006
Posts: 19

PostPosted: Thu Jun 28, 2007 11:01 am
Reply with quote

Hi,

I would like to know if I can verify the contents of an Alpha numeric field is numeric.

Also is there a function to know the length of Alpha numeric field/string in Easytrieve.

Thanks in advance.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Jul 01, 2007 1:54 am
Reply with quote

Hello,

You can code "IF fldname NUMERIC" (or NOT NUMERIC).

If your field is defined as varying in length, there is a length attribute.

If you have a 30-byte fixed length field and want to determine how many bytes are filled before the trailing spaces, you could redefine it as an array, begin testing bytes from the low order position until a non-space is encountered, and the displacement of the non-space is the "length".
Back to top
View user's profile Send private message
kitts

New User


Joined: 29 Jan 2006
Posts: 19

PostPosted: Sun Jul 01, 2007 10:07 am
Reply with quote

Thanks a lot. Yes this has helped me.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Jul 01, 2007 4:17 pm
Reply with quote

You're welcome 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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
Search our Forums:

Back to Top