[prev in list] [next in list] [prev in thread] [next in thread]
List: sas-l
Subject: Quoted comma delimited lists using macro or datastep tranwrd
From: Roger Deangelis <deangel () HORIZSYS ! COM>
Date: 1996-09-30 21:07:09
[Download RAW message or body]
I hope I am not beating a dead horse, but the new macro facilities allow
easy quoting and comma delimiting.
/* Suppose you have the macro assignment */
%let areas=A1 B2 C3 D4;
/*
and you want to create the quoted comma delimited string
"A1","B2","C3","D4"
*/
This will do it:
%let temp = %tranwrd(&areas,%str( ),",");
%let areas = "&temp";
%put areas= &areas;
You need the following macro ( or hardcode tranword ) see Macoe Enhancements
or Jeff Polzins papers.
%MACRO TRANWRD(ARG1,ARG2,ARG3)/des=" autocall macro function tranwrd.sas ";
%SYSFUNC(TRANWRD(&ARG1,&ARG2,&ARG3))
%MEND;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic