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

Comparable 'C' functiton LEN() in cobol


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

New User


Joined: 24 Jul 2006
Posts: 18

PostPosted: Tue Aug 01, 2006 6:09 pm
Reply with quote

HI,

Is there something comparable to LEN() length functionality in cobol ?

Thanks
J
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Wed Aug 02, 2006 5:14 am
Reply with quote

Do you mean the "C" Function STRLEN()

Dave
Back to top
View user's profile Send private message
chiranjeevi_mca

New User


Joined: 19 Feb 2006
Posts: 27

PostPosted: Wed Aug 02, 2006 9:55 am
Reply with quote

Hi,

There is a function called LENGTH OF data-item, but this results the value as the length declared in working storage section.
Ex:
working-storage declared as

01 a pic x(10)

move 'ABCD' to a

LENGH OF A - it gives the value of 10

if you want the output as 4 means you need to use the INSPECT.
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top