<?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 Re: proc export create files with missing extension &amp;quot; xls&amp;quot; in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/proc-export-create-files-with-missing-extension-quot-xls-quot/m-p/22004#M4732</link>
    <description>Very useful SAS DOC on this topic:&lt;BR /&gt;
&lt;BR /&gt;
SAS Macro Language: Reference, Scopes of Macro Variables &lt;BR /&gt;
Special Cases of Scope with the CALL SYMPUT Routine&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/tw3514-symput.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/tw3514-symput.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Wed, 25 Nov 2009 20:40:46 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-11-25T20:40:46Z</dc:date>
    <item>
      <title>proc export create files with missing extension " xls"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-export-create-files-with-missing-extension-quot-xls-quot/m-p/21998#M4726</link>
      <description>The objective was to create an excel work book for each row on Projects List.xls&lt;BR /&gt;
it is working fine but because some columns contains ALT+ENTER character the files that comes out from such rows   will not have the extention xls when i check that with the DOS command  DIR/P/W&lt;BR /&gt;
&lt;BR /&gt;
How can i force the system to save them as EXCEL WITHOUT MANUAL INTERACTION????????????????????????&lt;BR /&gt;
&lt;BR /&gt;
Any suggestion is welcome&lt;BR /&gt;
&lt;BR /&gt;
Here is a protion of the code that i created   &lt;BR /&gt;
&lt;BR /&gt;
options noxwait noxsync;&lt;BR /&gt;
Libname Lock excel "Q:\ADC-DM\DPB\Projects List.xls"; &lt;BR /&gt;
&lt;BR /&gt;
%macro doit;&lt;BR /&gt;
%do i=1 %to 75;&lt;BR /&gt;
 	data _null;&lt;BR /&gt;
      call symput("num",put(&amp;amp;i,z12.));&lt;BR /&gt;
    run; &lt;BR /&gt;
 PROC IMPORT OUT= Project&amp;amp;num. &lt;BR /&gt;
            DATAFILE= "PATH\Projects List.xls" &lt;BR /&gt;
            DBMS=EXCEL REPLACE;&lt;BR /&gt;
	 *SHEET="";&lt;BR /&gt;
     RANGE="Current$"; &lt;BR /&gt;
     GETNAMES=YES;&lt;BR /&gt;
     MIXED=NO;&lt;BR /&gt;
     SCANTEXT=YES;&lt;BR /&gt;
     USEDATE=YES;&lt;BR /&gt;
     SCANTIME=YES;&lt;BR /&gt;
RUN;&lt;BR /&gt;
data project&amp;amp;num.;&lt;BR /&gt;
   set Project&amp;amp;num.;&lt;BR /&gt;
&lt;BR /&gt;
   if _n_=&amp;amp;i. then output;&lt;BR /&gt;
run;&lt;BR /&gt;
/* Create a unique Excel Spread sheet for each project */&lt;BR /&gt;
&lt;BR /&gt;
PROC EXPORT DATA= project&amp;amp;num. &lt;BR /&gt;
 OUTFILE= "PATH2\project&amp;amp;num..xls" &lt;BR /&gt;
 DBMS=EXCEL LABEL REPLACE;&lt;BR /&gt;
     sheet="Status"; &lt;BR /&gt;
     NEWFILE=YES;&lt;BR /&gt;
RUN;&lt;BR /&gt;
Data _null_;&lt;BR /&gt;
X=Sleep(5,1);&lt;BR /&gt;
run;&lt;BR /&gt;
data _null_;&lt;BR /&gt;
set  project&amp;amp;num.;&lt;BR /&gt;
	length name5 $56.; &lt;BR /&gt;
	 name_=left(Project_Name___Programmer_Qcer);&lt;BR /&gt;
	 name_=trim(name_);&lt;BR /&gt;
	 name_=compbl(name_);&lt;BR /&gt;
     name_=translate(name_," "," '%$*#@!?/\.,:()&amp;amp;");&lt;BR /&gt;
	 name=compress(left(name_));&lt;BR /&gt;
	 name=catx('',name);&lt;BR /&gt;
	 name1=translate(name,"_"," ");&lt;BR /&gt;
	 name2=compress(name1, "_");&lt;BR /&gt;
	 name3=compress(name2);&lt;BR /&gt;
	 name4=substr(name3,1,52)||".xls";&lt;BR /&gt;
	 name5=translate(name4,"_"," ");&lt;BR /&gt;
	 call symput ('prj_nam',name5);&lt;BR /&gt;
X " cd PATH2 ";&lt;BR /&gt;
X " move /y project&amp;amp;num..xls  &amp;amp;prj_nam. "; /* Rename The file */&lt;BR /&gt;
&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
%end;&lt;BR /&gt;
%mend doit;&lt;BR /&gt;
&lt;BR /&gt;
%doit</description>
      <pubDate>Wed, 25 Nov 2009 15:47:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-export-create-files-with-missing-extension-quot-xls-quot/m-p/21998#M4726</guid>
      <dc:creator>WorldCup10</dc:creator>
      <dc:date>2009-11-25T15:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: proc export create files with missing extension " xls"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-export-create-files-with-missing-extension-quot-xls-quot/m-p/21999#M4727</link>
      <description>To start, can you identify what the file-extension will be with the command below, when executed:&lt;BR /&gt;
&lt;BR /&gt;
X " move /y project&amp;amp;num..xls &amp;amp;prj_nam. "; /* Rename The file */&lt;BR /&gt;
&lt;BR /&gt;
Also, you may want to get that sticky QUESTION_MARK key looked at.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Wed, 25 Nov 2009 17:49:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-export-create-files-with-missing-extension-quot-xls-quot/m-p/21999#M4727</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-11-25T17:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: proc export create files with missing extension " xls"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-export-create-files-with-missing-extension-quot-xls-quot/m-p/22000#M4728</link>
      <description>"MOVE"   is a DOS command  It   renames  files &lt;BR /&gt;
When it is used with /Y the system will not prompt you to confirm the overwrite if the file initially exist.&lt;BR /&gt;
&lt;BR /&gt;
BTW your question has led to me to change my line of code to &lt;BR /&gt;
&lt;BR /&gt;
X " move /y project&amp;amp;num..xls &amp;amp;prj_nam..xls ";  instead  of &lt;BR /&gt;
&lt;BR /&gt;
X " move /y project&amp;amp;num..xls &amp;amp;prj_nam. ";&lt;BR /&gt;
&lt;BR /&gt;
but still the problem persists</description>
      <pubDate>Wed, 25 Nov 2009 18:13:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-export-create-files-with-missing-extension-quot-xls-quot/m-p/22000#M4728</guid>
      <dc:creator>WorldCup10</dc:creator>
      <dc:date>2009-11-25T18:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: proc export create files with missing extension " xls"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-export-create-files-with-missing-extension-quot-xls-quot/m-p/22001#M4729</link>
      <description>Okay, now please explain the exact problem symptom you are experiencing and also what you are expecting the outcome to be.  Also, provide information about your SAS environment, such as OS, version, remote or local SAS execution.  And if you have any warnings/errors being generated, listing those diagnostics would be most useful.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
SAS/Access Interface to PC Files: Reference, Microsoft Excel Workbook Files&lt;BR /&gt;
Overview of Microsoft Excel Files Essentials&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/acpcref/61891/HTML/default/a003103761.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acpcref/61891/HTML/default/a003103761.htm&lt;/A&gt;</description>
      <pubDate>Wed, 25 Nov 2009 19:07:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-export-create-files-with-missing-extension-quot-xls-quot/m-p/22001#M4729</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-11-25T19:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: proc export create files with missing extension " xls"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-export-create-files-with-missing-extension-quot-xls-quot/m-p/22002#M4730</link>
      <description>&amp;gt; Okay, now please explain the exact problem symptom&lt;BR /&gt;
&amp;gt; you are experiencing and also what you are expecting&lt;BR /&gt;
&amp;gt; the outcome to be.  Also, provide information about&lt;BR /&gt;
&amp;gt; your SAS environment, such as OS, version, remote or&lt;BR /&gt;
&amp;gt; local SAS execution.  And if you have any&lt;BR /&gt;
&amp;gt; warnings/errors being generated, listing those&lt;BR /&gt;
&amp;gt; diagnostics would be most useful.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Scott Barry&lt;BR /&gt;
&amp;gt; SBBWorks, Inc.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; SAS/Access Interface to PC Files: Reference,&lt;BR /&gt;
&amp;gt; Microsoft Excel Workbook Files&lt;BR /&gt;
&amp;gt; Overview of Microsoft Excel Files Essentials&lt;BR /&gt;
&amp;gt; &lt;A href="http://support.sas.com/documentation/cdl/en/acpcref/61" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/acpcref/61&lt;/A&gt;&lt;BR /&gt;
&amp;gt; 891/HTML/default/a003103761.htm&lt;BR /&gt;
&lt;BR /&gt;
It is a PC SAS 9.2 on XP_PRO platform &lt;BR /&gt;
The log is clean there is no  Warning or  error messages&lt;BR /&gt;
Now I suspect the problem  to be due to DOS and not SAS because  during the execution Excel  gets created  and once it reaches the phase of  renaming files things gets screwed i have refreshed the contents of "Path2" the location where files gets dumped  continously and i noticed that when the  loop reaches  for example at 6 where xls  extention did not occur i see that  project000000000006.xls  gets initially created and then later renaming it based on the contents of certain excel cell  leads to a file with no extention DMFY2010CustomerRequirements</description>
      <pubDate>Wed, 25 Nov 2009 20:27:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-export-create-files-with-missing-extension-quot-xls-quot/m-p/22002#M4730</guid>
      <dc:creator>WorldCup10</dc:creator>
      <dc:date>2009-11-25T20:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: proc export create files with missing extension " xls"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-export-create-files-with-missing-extension-quot-xls-quot/m-p/22003#M4731</link>
      <description>I also see a CALL SYMPUT towards the end of your DATA step directly followed by a reference to the related macro variable, which will not work, without adding a RUN; statement before the X commands.&lt;BR /&gt;
&lt;BR /&gt;
Adding the following would help you debug the program execution, step by step, and most importantly the DATA step execution:&lt;BR /&gt;
&lt;BR /&gt;
OPTIONS SOURCE SOURCE2 MACROGEN SYMBOLGEN MLOGIC;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Wed, 25 Nov 2009 20:39:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-export-create-files-with-missing-extension-quot-xls-quot/m-p/22003#M4731</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-11-25T20:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: proc export create files with missing extension " xls"</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/proc-export-create-files-with-missing-extension-quot-xls-quot/m-p/22004#M4732</link>
      <description>Very useful SAS DOC on this topic:&lt;BR /&gt;
&lt;BR /&gt;
SAS Macro Language: Reference, Scopes of Macro Variables &lt;BR /&gt;
Special Cases of Scope with the CALL SYMPUT Routine&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/tw3514-symput.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/tw3514-symput.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Wed, 25 Nov 2009 20:40:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/proc-export-create-files-with-missing-extension-quot-xls-quot/m-p/22004#M4732</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-11-25T20:40:46Z</dc:date>
    </item>
  </channel>
</rss>

