Prev: excel created by tagsets.excelXP cannot be opened
Next: Need to concatenate numeric values into one char value
From: Mindy on 7 May 2010 13:06 Hey, guys, I saw a code to get lab test number automatically. Anyone know countw function? Is SAS's new release? %let lablist = ca ca_cr; .... %let lbnum=%sysfunc (countw (&lablist ) ); data temp; %do i=1 %to &lbnum; if lbtestcd = ... %end; run; .. Thanks, Mindy
From: Paige Miller on 7 May 2010 16:44
On May 7, 1:06 pm, Mindy <master2005_...(a)yahoo.com> wrote: > Hey, guys, > > I saw a code to get lab test number automatically. Anyone know countw > function? Is SAS's new release? > > %let lablist = ca ca_cr; > ... > %let lbnum=%sysfunc (countw (&lablist ) ); > > data temp; > > %do i=1 %to &lbnum; > if lbtestcd = ... > %end; > run; > .. > Thanks, > Mindy Countw works in SAS 9.1 and higher, I believe. Also, read http://support.sas.com/kb/26/152.html -- Paige Miller paige\dot\miller \at\ kodak\dot\com |