Return to Snippet

Revision: 64321
at July 24, 2013 00:51 by webonomic


Initial Code
/*If you have a short list of items:*/

%let _items= January/April/June/December;
%macro t;
%let _len=%eval(%sysfunc(countc(&_items,/)) + 1);
%do _i=1 %to &_len;
    %let _item=%scan(&_items,&_i);
    %put "&_item";
%end;
%mend;
 
/*If it is a long list (exceding 64k in byte), put them in a SAS data set. 
Loop through all then items using SAS data set direct access with "point=" option.*/

Initial URL

                                

Initial Description
More details here: https://communities.sas.com/ideas/1084

Initial Title
Allow a list of non-numeric values for an iterative macro %DO loop

Initial Tags
list

Initial Language
SAS