Does any one know an easy way to Unstring a field like the Cobol command
UNSTRING WS-ARRAY DELIMITED BY ","
INTO RPT-ARRAY(1)
RPT-ARRAY(2)
RPT-ARRAY(3)
RPT-ARRAY(4)
RPT-ARRAY(5)
RPT-ARRAY(6)
RPT-ARRAY(7)
RPT-ARRAY(8)
RPT-ARRAY(9)
RPT-ARRAY(10)
RPT-ARRAY(11).
*
The field coming in is delimited by commas and contains 11 seperate values.
Hi Chuck,
My answer comes without the aid of any PowerHouse manuals in front of me, but with 18 years experience, here goes ...
As less elegant but just-as-useful approach (assuming that your using Quick) is to use a While-Retrieving loop and combine two function - Index and Substring. Index will give you the relative prosition number of each comma, and substring will allow you to extract the value beween commas or at the start of or the end of each record.
If you're using Quiz or QTP then you still use the two functions but appy them to each record of the record complex ensuring that you've call the data file in the Access statement.
Good luck!
Thanks, I'll try it.