Hi there,
I have this macro that I am running and need to parse out "3 Month" and "6 Month" from the %mo_str_list line below. When using the scan function, however, it only pulls the "3" because of the spaces in "3 Month". I would like to have 3 Month and 6 Month separately to be able to create my report in the correct folder, as these are imputed into the file path when creating the report. Is there a way to do this?
Below is the code I am using. The error I get just says that the file path does not exist.
%macro cityinc(city, zipcity);
%let months = 3mo 6mo /*9mo*/; /* Add or remove months as needed */ %let mo_dt_list = mo3_dt mo6_dt /*mo9_dt*/; /* Corresponding date variables */ %let mo_str_list = 3 Month 6 Month /*9 Month*/; /* Corresponding month descriptions */
ods listing close;
%do i = 1 %to %sysfunc(countw(&months)); %let month = %scan(&months, &i); %let mo_dt = %scan(&mo_dt_list, &i); %let mo_str = %scan(&mo_str_list, &i, q);
****REPORT CODE HERE*****
%end;
Thanks for your help!
... View more