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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.