Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

COBOL Programming :: RE: Unstring list of values into an array.

$
0
0
Author: Robert Sample
Posted: Mon Jun 27, 2016 7:15 pm (GMT 5.5)

UNSTRING is not really designed for what you want to do.

One possible way: use UNSTRING into 5 variables -- the first 4 and then a remainder variable. Use reference modification to find the next delimiter in the remainder variable, move the city name to your array, then increment past the delimiter you found and repeat until you don't find any more delimiters.
_________________
TANSTAAFL

The first rule of code reuse is that the code needs to be worth re-using.

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." -- Donald Knuth


Viewing all articles
Browse latest Browse all 9405

Trending Articles