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.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.