<?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 update a  xpt file name with the sysdate in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64679#M14058</link>
    <description>I have set up a sas program to runn automatically and create an XPT file. How can I update this xpt file name to have current date in the name in order to identify the xpt ?&lt;BR /&gt;
Any suggestion would be helpful</description>
    <pubDate>Mon, 16 Aug 2010 20:02:35 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-08-16T20:02:35Z</dc:date>
    <item>
      <title>update a  xpt file name with the sysdate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64679#M14058</link>
      <description>I have set up a sas program to runn automatically and create an XPT file. How can I update this xpt file name to have current date in the name in order to identify the xpt ?&lt;BR /&gt;
Any suggestion would be helpful</description>
      <pubDate>Mon, 16 Aug 2010 20:02:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64679#M14058</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-08-16T20:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: update a  xpt file name with the sysdate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64680#M14059</link>
      <description>When you create the name of a data set or file say xxxx include the macro variable &amp;amp;sysdate (I prefer &amp;amp;sysdate9) in the name.  Something like:&lt;BR /&gt;
&lt;BR /&gt;
xxxx&amp;amp;sysdate9&lt;BR /&gt;
&lt;BR /&gt;
If an extension is needed&lt;BR /&gt;
&lt;BR /&gt;
xxxx&amp;amp;sysdate9..xpt    (notice the double dot)</description>
      <pubDate>Tue, 17 Aug 2010 06:05:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64680#M14059</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-08-17T06:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: update a  xpt file name with the sysdate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64681#M14060</link>
      <description>Also, any SAS date format can be generated using %SYSFUNC with PUTN as shown below:&lt;BR /&gt;
&lt;BR /&gt;
%let today_formatted = %sysfunc(putn(%sysfunc(today()),yymmddn8.));&lt;BR /&gt;
%put _user_;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 17 Aug 2010 12:51:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64681#M14060</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-08-17T12:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: update a  xpt file name with the sysdate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64682#M14061</link>
      <description>Too many %SYSFUNCs.  The often neglected optional second parameter is &lt;FORMAT&gt;&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
4594  %let today_formatted = %sysfunc(today(),yymmddn8.);&lt;BR /&gt;
4595  %put _user_;&lt;BR /&gt;
GLOBAL TODAY_FORMATTED 20100817&lt;BR /&gt;
[/pre]&lt;/FORMAT&gt;</description>
      <pubDate>Tue, 17 Aug 2010 14:27:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64682#M14061</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-08-17T14:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: update a  xpt file name with the sysdate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64683#M14062</link>
      <description>Thanks, but how do I assign this to the filename? for eg xpt name XXXXXX_&amp;amp;sysdate9...xpt should be create in filename trfile 'C:\SAS\XXXXXX_&amp;amp;sysdate9...xpt. Is this possible or there is some other means of doing it?</description>
      <pubDate>Tue, 17 Aug 2010 14:37:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64683#M14062</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-08-17T14:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: update a  xpt file name with the sysdate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64684#M14063</link>
      <description>%let today_formatted = %sysfunc(today(),date9.); is the format I am using, but how can I assign this in the trfile where it has to be created?</description>
      <pubDate>Tue, 17 Aug 2010 14:39:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64684#M14063</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-08-17T14:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: update a  xpt file name with the sysdate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64685#M14064</link>
      <description>Are you wanting to add the date stamp to each SAS data set name this is added to the date stamped XPORT library?</description>
      <pubDate>Tue, 17 Aug 2010 14:44:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64685#M14064</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-08-17T14:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: update a  xpt file name with the sysdate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64686#M14065</link>
      <description>No. only to the XPT file that will be created using cport. for eg my code is&lt;BR /&gt;
&lt;BR /&gt;
%let today = %sysfunc(today(),date9.);&lt;BR /&gt;
libname trData 'P:\SAS Programs\Datasets';&lt;BR /&gt;
filename trFile 'P:\SAS Programs\Data\Datasets\Lm-LLO-E7-07_EXTRACT_&amp;amp;today...xpt' ;&lt;BR /&gt;
             &lt;BR /&gt;
&lt;BR /&gt;
proc cport library=trData file=trFile;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Is my code correct for creating an XPT with date stamp?</description>
      <pubDate>Tue, 17 Aug 2010 14:50:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64686#M14065</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-08-17T14:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: update a  xpt file name with the sysdate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64687#M14066</link>
      <description>&amp;gt; filename trFile 'P:\SAS Programs\Data\Datasets\Lm-LLO-E7-EXTRACT_&amp;amp;today...x&amp;gt; pt' ;&lt;BR /&gt;
&lt;BR /&gt;
You need to use DOUBLE quotes so &amp;amp;today will be resolved.</description>
      <pubDate>Tue, 17 Aug 2010 14:54:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64687#M14066</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-08-17T14:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: update a  xpt file name with the sysdate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64688#M14067</link>
      <description>Thanks a lot. I just missed to try that simple step!!!! Thanks, anyways.&lt;BR /&gt;
&lt;BR /&gt;
One more question:&lt;BR /&gt;
How do we handle the missing values in a field(VSTMD) thats a varchar datatype and that has to be written into a numeric SAS date field? Since it is a "null" value, SAS considers as both character and numeric variable. How can this be resolved?</description>
      <pubDate>Tue, 17 Aug 2010 15:08:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64688#M14067</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-08-17T15:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: update a  xpt file name with the sysdate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64689#M14068</link>
      <description>See reply to "How do we handle..." here:&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?threadID=10841" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?threadID=10841&lt;/A&gt;

Message was edited by: sbb</description>
      <pubDate>Tue, 17 Aug 2010 18:23:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/update-a-xpt-file-name-with-the-sysdate/m-p/64689#M14068</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-08-17T18:23:59Z</dc:date>
    </item>
  </channel>
</rss>

