Your post makes no sense. Supply, per the guidance found when you post a question, test data in the form of a datastep, what the output should look like, any logic which may happen. Also post any code you have tried as this is not a contract work forum but a Q&A.
Do also note that yesterday there was an issue with the forum, you should now be able to use RichText box with code windows - {i} above post area - and proper formatting to show clearly what you want.
You really really need to format your questions better. A big lump of text is just lazy.
From what I understood:
data HAVE;
length VAR $100 ;
array COL [6] $20;
VAR='But I don''t see why you need to bother won''t the consumer of your XPORT file just glue the cut up ';
START=1;
do C=1 to 6;
END=find(VAR,' ',-START-20);
COL[C]=substr(VAR, START, END);
START=END;
end;
run;
COL1 | COL2 | COL3 | COL4 | COL5 | COL6 |
---|---|---|---|---|---|
But I don't see why | you need to bother | won't the consumer | of your XPORT file | just glue the cut u | up |
I let you sort out the behaviour when reaching the end of the string if the above is too basic.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.