<?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: Including date,time and username in ODS Filename in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Including-date-time-and-username-in-ODS-Filename/m-p/174328#M12421</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the reply &lt;STRONG&gt;RW9 &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;It almost works perfectly, I think I just have to adjust the format of sysfunc(time(),tod5.) since currently it gives output_test08JAN2015_t13 and messes with the format of the file.&lt;/P&gt;&lt;P&gt;Can you recommend a format which will be in the form of 132750 (hhmmss) rather than the usual 13:27:50 (hh:mm:ss) format ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Jan 2015 11:29:18 GMT</pubDate>
    <dc:creator>mjheever</dc:creator>
    <dc:date>2015-01-08T11:29:18Z</dc:date>
    <item>
      <title>Including date,time and username in ODS Filename</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Including-date-time-and-username-in-ODS-Filename/m-p/174325#M12418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I got a bit stuck with this problem, I have the following coding:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let path=C:\Users\User1\Documents\My SAS Files\Project;&lt;/P&gt;&lt;P&gt;%let person=%sysget(USERNAME);&lt;/P&gt;&lt;P&gt;%let systime_s = %sysfunc(timepart(%substr(&amp;amp;SysProcessId,1,16)x),time8.);&lt;/P&gt;&lt;P&gt;%let sysdate_t = &amp;amp;sysdate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp; ods _all_ close;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ods listing close;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ods pdf style=BStyle bookmarklist=hide &lt;STRONG&gt;file="&amp;amp;path./output_test&amp;amp;sysdate_t.&amp;amp;systime_s.&amp;amp;person..pdf&lt;/STRONG&gt;" startpage = never;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ods pdf;&amp;nbsp; &lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;So what I want to achieve is to have the file name look something like this: output_test08JAN15123448User1.pdf - that is filename=output_test(&lt;EM&gt;todays date&lt;/EM&gt;)(&lt;EM&gt;Todays time with seconds&lt;/EM&gt;)(&lt;EM&gt;Username&lt;/EM&gt;).pdf&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any suggestions how to do this ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Someone suggested the call symputx function but I'm not sure how to use it in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 10:29:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Including-date-time-and-username-in-ODS-Filename/m-p/174325#M12418</guid>
      <dc:creator>mjheever</dc:creator>
      <dc:date>2015-01-08T10:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Including date,time and username in ODS Filename</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Including-date-time-and-username-in-ODS-Filename/m-p/174326#M12419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the %sysfunc syntax, with the date() and time() function and put them into whatever format you want. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let path=C:\Users\User1\Documents\My SAS Files\Project;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;ods _all_ close;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ods listing close;&lt;/P&gt;&lt;P&gt;ods pdf style=BStyle bookmarklist=hide &lt;STRONG&gt;file="&amp;amp;path./output_test%sysfunc(date(),date9.)_t%sysfunc(time(),tod5.)_s%sysget(USERNAME).pdf&lt;/STRONG&gt;" startpage = never;&lt;/P&gt;&lt;P&gt;ods pdf;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 10:50:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Including-date-time-and-username-in-ODS-Filename/m-p/174326#M12419</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-01-08T10:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Including date,time and username in ODS Filename</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Including-date-time-and-username-in-ODS-Filename/m-p/174327#M12420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The file separator is \ (for windows) in &amp;amp;path, while it is / (for Unix) in file=" " , you can't combine them together .What OS is your SAS under ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 11:25:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Including-date-time-and-username-in-ODS-Filename/m-p/174327#M12420</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2015-01-08T11:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Including date,time and username in ODS Filename</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Including-date-time-and-username-in-ODS-Filename/m-p/174328#M12421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the reply &lt;STRONG&gt;RW9 &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://communities.sas.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/STRONG&gt;. &lt;/P&gt;&lt;P&gt;It almost works perfectly, I think I just have to adjust the format of sysfunc(time(),tod5.) since currently it gives output_test08JAN2015_t13 and messes with the format of the file.&lt;/P&gt;&lt;P&gt;Can you recommend a format which will be in the form of 132750 (hhmmss) rather than the usual 13:27:50 (hh:mm:ss) format ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 11:29:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Including-date-time-and-username-in-ODS-Filename/m-p/174328#M12421</guid>
      <dc:creator>mjheever</dc:creator>
      <dc:date>2015-01-08T11:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Including date,time and username in ODS Filename</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Including-date-time-and-username-in-ODS-Filename/m-p/174329#M12422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, formats are at: &lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a001263753.htm"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a001263753.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You may however need to do:&amp;nbsp; %sysfunc(compress(%sysfunc(time(),time8.),:.)) so&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;file="&amp;amp;path./output_test%sysfunc(date(),date9.)_t%sysfunc(compress(%sysfunc(time(),time8.),:.))_s%sysget(USERNAME).pdf&lt;/STRONG&gt;" startpage = never;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 11:33:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Including-date-time-and-username-in-ODS-Filename/m-p/174329#M12422</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-01-08T11:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Including date,time and username in ODS Filename</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Including-date-time-and-username-in-ODS-Filename/m-p/174330#M12423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I really need to scratch up with my date/time formats :smileyshocked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works like a charm now &lt;STRONG&gt;RW9&lt;/STRONG&gt;, thank you very much. &lt;/P&gt;&lt;P&gt;Give this man a Bells !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 11:48:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Including-date-time-and-username-in-ODS-Filename/m-p/174330#M12423</guid>
      <dc:creator>mjheever</dc:creator>
      <dc:date>2015-01-08T11:48:29Z</dc:date>
    </item>
  </channel>
</rss>

