
Reply to comment
Reply
Click the +1 button below to share it with your friends and colleagues
Share this if you liked it!
Click the +1 button below to share it with your friends and colleagues
t-decoration:none;text-underline:none'>IBM DB2 Certification
LOGOUT
Number of Registered users 714
|
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.