Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. %let str7=ABC DEF UVW XYZ;
  2.  
  3. %let str8 = %qsysfunc(quote(%qsysfunc(tranwrd(%qsysfunc(compbl(%qsysfunc(strip(%upcase(&str7.))))),%str( ),%nrstr(%")))));
  4.  
  5. %put ^^^^&str8;
  6.  
  7. proc fcmp outlib=work.funcs.funcs;
  8.  
  9. function delimit_words(iString $) $;
  10. result = '"' || tranwrd(cats(compbl(iString))," ", '" ,"') || '"';
  11. return (result );
  12. endsub;
  13.  
  14. run;
  15.  
  16.  
  17. %let x = A B C ;
  18. %let y = %sysfunc(delimit_words(&x));
  19. %put &y;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement