Page 1 of 1

Length of string

PostPosted: Mon Dec 21, 2009 10:33 am
by marirajakumari
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?

Re: Length of string

PostPosted: Mon Dec 21, 2009 10:44 am
by dick scherrer
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?