<?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: Changing last modified time in txt file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Changing-last-modified-time-in-txt-file/m-p/905256#M357557</link>
    <description>&lt;P&gt;One, in the future pleases post code examples or log text by copying the text and pasting into a text box opened on the forum using the &amp;lt;/&amp;gt; icon that appears above the main message box.&lt;/P&gt;
&lt;P&gt;The result will look like this: (a bit I have in my log at the moment)&lt;/P&gt;
&lt;PRE&gt;157  proc transpose data=s out=s_trans;
158    by id;
159    var price;
160  run;

NOTE: There were 9 observations read from the data set WORK.S.
NOTE: The data set WORK.S_TRANS has 2 observations and 7 variables.
NOTE: PROCEDURE TRANSPOSE used (Total process time):
      real time           0.02 seconds
      cpu time            0.01 seconds
&lt;/PRE&gt;
&lt;P&gt;When you provide examples as text if you are close we can make small edits and paste it back as text that you can then copy and paste into your program. If you provide a picture that is not possible. Also, we can't test your code and if the code is more than a few lines almost no one is going to retype it from scratch.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where do you define the macro variables &amp;amp;stag and &amp;amp;out_filename?&lt;/P&gt;
&lt;P&gt;If &amp;amp;stag does not point to a path including the root of a drive that would part of the problem.&lt;/P&gt;
&lt;P&gt;Which is another point: code should include complete code, macro references without definitions are nearly impossible to debug.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Nov 2023 20:32:46 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2023-11-29T20:32:46Z</dc:date>
    <item>
      <title>Changing last modified time in txt file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-last-modified-time-in-txt-file/m-p/905218#M357547</link>
      <description>&lt;P&gt;Hello there!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't figure out how to modified the creation date of a file in a sas' directory. I need that in order to "translate" the touch command in Unix lenguage.&lt;BR /&gt;Looking around in SASHelp website, i didnt find anything that could work.&lt;/P&gt;&lt;P&gt;Where can I find some tips to solve this problem?&lt;/P&gt;&lt;P&gt;I attached the code itself here below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="edopap_0-1701277584457.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/90445i9B106063BAE0AC35/image-size/medium?v=v2&amp;amp;px=400" role="button" title="edopap_0-1701277584457.png" alt="edopap_0-1701277584457.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any advice is appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 17:09:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-last-modified-time-in-txt-file/m-p/905218#M357547</guid>
      <dc:creator>edopap</dc:creator>
      <dc:date>2023-11-29T17:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Changing last modified time in txt file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-last-modified-time-in-txt-file/m-p/905256#M357557</link>
      <description>&lt;P&gt;One, in the future pleases post code examples or log text by copying the text and pasting into a text box opened on the forum using the &amp;lt;/&amp;gt; icon that appears above the main message box.&lt;/P&gt;
&lt;P&gt;The result will look like this: (a bit I have in my log at the moment)&lt;/P&gt;
&lt;PRE&gt;157  proc transpose data=s out=s_trans;
158    by id;
159    var price;
160  run;

NOTE: There were 9 observations read from the data set WORK.S.
NOTE: The data set WORK.S_TRANS has 2 observations and 7 variables.
NOTE: PROCEDURE TRANSPOSE used (Total process time):
      real time           0.02 seconds
      cpu time            0.01 seconds
&lt;/PRE&gt;
&lt;P&gt;When you provide examples as text if you are close we can make small edits and paste it back as text that you can then copy and paste into your program. If you provide a picture that is not possible. Also, we can't test your code and if the code is more than a few lines almost no one is going to retype it from scratch.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where do you define the macro variables &amp;amp;stag and &amp;amp;out_filename?&lt;/P&gt;
&lt;P&gt;If &amp;amp;stag does not point to a path including the root of a drive that would part of the problem.&lt;/P&gt;
&lt;P&gt;Which is another point: code should include complete code, macro references without definitions are nearly impossible to debug.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 20:32:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-last-modified-time-in-txt-file/m-p/905256#M357557</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-11-29T20:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Changing last modified time in txt file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-last-modified-time-in-txt-file/m-p/905259#M357559</link>
      <description>First try your code without macro variables. And when using system commands, first ensure the system commands also run. &lt;BR /&gt;&lt;BR /&gt;So what is the  issue with the code posted? Does it not work? are there errors in the log?</description>
      <pubDate>Wed, 29 Nov 2023 20:49:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-last-modified-time-in-txt-file/m-p/905259#M357559</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-11-29T20:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Changing last modified time in txt file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-last-modified-time-in-txt-file/m-p/905260#M357560</link>
      <description>I would probably use a different variable name than execute as well, that seems like it could cause issues.</description>
      <pubDate>Wed, 29 Nov 2023 20:50:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-last-modified-time-in-txt-file/m-p/905260#M357560</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-11-29T20:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: Changing last modified time in txt file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-last-modified-time-in-txt-file/m-p/905266#M357564</link>
      <description>&lt;P&gt;To successfully run your program you will need the SAS option XCMD enabled since you are trying to run an OS command from SAS. You can check the status of this option by running this SAS program:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc options option = xcmd;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Nov 2023 21:22:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-last-modified-time-in-txt-file/m-p/905266#M357564</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-11-29T21:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Changing last modified time in txt file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-last-modified-time-in-txt-file/m-p/905273#M357570</link>
      <description>&lt;P&gt;The code you posted is using the TOUCH command.&lt;/P&gt;
&lt;P&gt;So what is it that you want translated?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;State clearly what you want.&amp;nbsp; You mentioned modified time IN a file.&amp;nbsp; The code you posted is not putting anything INTO a file.&amp;nbsp; It is changing the last modified date OF a file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 22:42:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-last-modified-time-in-txt-file/m-p/905273#M357570</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-11-29T22:42:42Z</dc:date>
    </item>
    <item>
      <title>Re: Changing last modified time in txt file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-last-modified-time-in-txt-file/m-p/905315#M357582</link>
      <description>&lt;P&gt;Run your external command in a pipe:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
infile "&amp;lt;external command&amp;gt; 2&amp;gt;&amp;amp;1" pipe;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;so you read all responses in the SAS log; you may have to attach the 2&amp;gt;&amp;amp;1 routing to each single command.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 07:41:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-last-modified-time-in-txt-file/m-p/905315#M357582</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-11-30T07:41:05Z</dc:date>
    </item>
  </channel>
</rss>

