Length of string



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Length of string

Postby marirajakumari » Mon Dec 21, 2009 10:33 am

There is a field with Pic X(100). For eg: if the field contains 'P R I Y A RAJ T A K R E'. How will i get the length of this string in cobol?
marirajakumari
 
Posts: 1
Joined: Mon Dec 21, 2009 10:31 am
Has thanked: 0 time
Been thanked: 0 time

Re: Length of string

Postby dick scherrer » Mon Dec 21, 2009 10:44 am

Hello and welcome to the forums,

The length of the string will always be 100.

What are you trying to calculate? The total number of spaces? The total number of non-space bytes? The start and end position of thd P and thd E? Something else?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post