title: Avoid punctuation as delimiter in list
body: <p>I have a list (of frequencies) that I want to loop through. Example list:</p>
  
  <pre><code>%let Freq_list = min5 min2 sec60.31 sec30; 
  </code></pre>
  
  <p>As default SAS treat the punctation in "sec60.31" as a delimiter. How do I avoid using punctuation (".") as delimiter in the list? </p>
  
  <p>I want to loop through this list of frequencies, and then want "sec60.31" to become one such member to extract from the list. </p>
  
  <p>More code (part of program): </p>
  
  <pre><code>%let n_f = %sysfunc(countw(&amp;freqlist));
  
  %do I_f=1 %to &amp;n_f;
  %let freq = %scan(&amp;freqlist,&amp;I_f);
  %let freqtext = %scan(&amp;freqtextlist,&amp;I_f);
  proc timeseries data=[datafile] out= [datafile]_&amp;freqtext.;
  where weekday between 2 and 6;
  id datetime interval=&amp;freq accumulate=last setmissing=missing align=beg start = '01jan1999.00:05'dt end = '01dec2014.00:00'dt;
  var price;
  run;
  %end;
  </code></pre>
  
  <p>The result is that it runs PROC TIMESERIES with "interval = sec60", and then produce the following error when it comes to the "31"-part:</p>
  
  <pre><code>NOTE: Line generated by the macro variable "FREQ".
  1     31
        --
        22
        200
  ERROR 22-322: Syntax error, expecting one of the following: a name, a format name.
  ERROR 200-322: The symbol is not recognized and will be ignored.
  </code></pre>
  
  <p>The counter &amp;n_f indicates that the COUNTW-function treat "." as a delimter so I guess I both need the COUNTW-function and the SCAN-function to recognize the delimiter. </p>
  
  <p>As you may have noticed I have another list to use in file-names etc. </p>
  
  <pre><code>%let Freq_textlist = min5 min2 min1 sec30; 
  </code></pre>
  
  <p>One solution for my problem could be to get counter &amp;n_f from this list (which is of equal length), and change my freq_list to:</p>
  
  <pre><code>%let Freq_list = min5@min2@sec60.31@sec30; 
  </code></pre>
  
  <p>and use %scan with delimiter-paramter, as in:</p>
  
  <pre><code>%let freq = %scan(&amp;freqlist,&amp;I_f,@);
  </code></pre>
  
  <p>This works without having to deal with how COUNTW can recognize "." as not a delimiter.</p>