Joined: 06 Jun 2008 Posts: 8201 Location: Dubuque, Iowa, USA
What have you tried so far and what results have you gotten?
Have you clicked on the manuals link at the top of the page and read the COBOL Language Reference manual on the STRING statement?
Is this possible..
Yes, it is possible. However, this is a HELP forum, not a DO-YOUR-JOB-FOR-YOUR forum, so don't expect us to just give you the code. We can guide you when you have problems, but since most of us responders are paid for our professional work output, asking for code will not typically get you much unless you're willing to pay the going daily rates (typically about 1000 U.S. dollars per day or fraction thereof).
Joined: 20 Oct 2006 Posts: 6970 Location: porcelain throne
unless any of the var's can contain all spaces:
simply string a var, delimited by spaces,a '|', then then next var, etc.
then do an inspect tally reverse for first non-space will give you the length.
or simply increment an index until a space is encountered.