<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic compress worksheet name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/compress-worksheet-name/m-p/74818#M16121</link>
    <description>The worksheet name (which is &amp;amp;dat passed as parameter) has spaces in them. I used compress function in the data step to compress the spaces.But it doesnt seem to work and throws an error ,because sas will not support spaces in the dataset name.&lt;BR /&gt;
any work around for this?&lt;BR /&gt;
%macro import_caremark(dat);&lt;BR /&gt;
PROC IMPORT OUT= &amp;amp;dat &lt;BR /&gt;
            DATAFILE= "&amp;amp;inpt.\MPB 2009 08 revised.xls" &lt;BR /&gt;
            DBMS=EXCEL REPLACE;&lt;BR /&gt;
            range"&amp;amp;dat$A3:M32";&lt;BR /&gt;
           GETNAMES=YES;&lt;BR /&gt;
           MIXED=yes;&lt;BR /&gt;
           SCANTEXT=YES;&lt;BR /&gt;
           USEDATE=no;&lt;BR /&gt;
          SCANTIME=YES;&lt;BR /&gt;
	 &lt;BR /&gt;
&lt;BR /&gt;
RUN;&lt;BR /&gt;
   data %sysfunc(compress(&amp;amp;dat));&lt;BR /&gt;
	  set %sysfunc(compress(&amp;amp;dat));&lt;BR /&gt;
 file_date=put(intnx('month',date(),-1),YYMMD7.);&lt;BR /&gt;
run;&lt;BR /&gt;
%mend;&lt;BR /&gt;
%import_caremark(MPB Sales Report August09);</description>
    <pubDate>Wed, 07 Oct 2009 14:41:10 GMT</pubDate>
    <dc:creator>SASPhile</dc:creator>
    <dc:date>2009-10-07T14:41:10Z</dc:date>
    <item>
      <title>compress worksheet name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/compress-worksheet-name/m-p/74818#M16121</link>
      <description>The worksheet name (which is &amp;amp;dat passed as parameter) has spaces in them. I used compress function in the data step to compress the spaces.But it doesnt seem to work and throws an error ,because sas will not support spaces in the dataset name.&lt;BR /&gt;
any work around for this?&lt;BR /&gt;
%macro import_caremark(dat);&lt;BR /&gt;
PROC IMPORT OUT= &amp;amp;dat &lt;BR /&gt;
            DATAFILE= "&amp;amp;inpt.\MPB 2009 08 revised.xls" &lt;BR /&gt;
            DBMS=EXCEL REPLACE;&lt;BR /&gt;
            range"&amp;amp;dat$A3:M32";&lt;BR /&gt;
           GETNAMES=YES;&lt;BR /&gt;
           MIXED=yes;&lt;BR /&gt;
           SCANTEXT=YES;&lt;BR /&gt;
           USEDATE=no;&lt;BR /&gt;
          SCANTIME=YES;&lt;BR /&gt;
	 &lt;BR /&gt;
&lt;BR /&gt;
RUN;&lt;BR /&gt;
   data %sysfunc(compress(&amp;amp;dat));&lt;BR /&gt;
	  set %sysfunc(compress(&amp;amp;dat));&lt;BR /&gt;
 file_date=put(intnx('month',date(),-1),YYMMD7.);&lt;BR /&gt;
run;&lt;BR /&gt;
%mend;&lt;BR /&gt;
%import_caremark(MPB Sales Report August09);</description>
      <pubDate>Wed, 07 Oct 2009 14:41:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/compress-worksheet-name/m-p/74818#M16121</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2009-10-07T14:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: compress worksheet name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/compress-worksheet-name/m-p/74819#M16122</link>
      <description>Code a %LET statement before the PROC IMPORT to perform the compress on your &amp;amp;DAT variable.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Wed, 07 Oct 2009 15:54:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/compress-worksheet-name/m-p/74819#M16122</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-10-07T15:54:23Z</dc:date>
    </item>
  </channel>
</rss>

