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

Is it possible to get the data size in the Variable


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

New User


Joined: 09 May 2005
Posts: 51
Location: Singapore

PostPosted: Fri Jun 03, 2005 8:42 pm
Reply with quote

Hi,

Is it possible to identify the exact size of the data(Excluding trailing spaces) ?

For example:
Var1 pic x(300).
Move 'Testing' To Var1
Length of Var1 returns 300

I would like to get the size of the data part alone (i.e size of 'Testing' alone)

Thanks,
Vivek
Back to top
View user's profile Send private message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Sun Jun 05, 2005 12:42 am
Reply with quote

It will move trailing spaces too...
Back to top
View user's profile Send private message
mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 237
Location: USA

PostPosted: Sun Jun 05, 2005 2:17 am
Reply with quote

kvivek,

Use INSPECT command to get the field length

Go through following link for more details

INSPECT STATEMENT

Hope this helps

Regards
Mayuresh
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 Store the data for fixed length COBOL Programming 1
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top