Clicky
Skip to Content
Custom Search

Reply to comment

Anonymous
Actual length of the string.

Various ways of doing this not sure which would be more efficient, it may depend on the average lenght of the string and the rules around how you want to split it up.

Simplest method:

01 i pic s9(4) comp.

perform varying i from +20 by -1 until Ws-emp-name(i:1) not = space end-perform

or string ws-emp-name delimited by space into ws-work-space pointer ws-emp-name-length end-string

not sure of the exact syntax of the string command please look at the cobol manual. but the ws-emp-name-length will be the string length +1.

Reply

  • Allowed HTML tags:
      1. Lines and paragraphs break automatically.

    More information about formatting options

    CAPTCHA
    This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Navigation

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer



Number of Registered users 714
Theme by Dr. Radut.