<?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: How to recover last code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/302348#M64138</link>
    <description>&lt;P&gt;Hi, Thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As this approach can help you in the &amp;nbsp;current session.&lt;/P&gt;&lt;P&gt;I just want to know suppose I have created &amp;nbsp;permanent dataset in a library say a.&lt;/P&gt;&lt;P&gt;then after I close the sas&amp;nbsp;session. I want to get a previous log or any other info which tell me which code was submitted to create a dataset a ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;</description>
    <pubDate>Tue, 04 Oct 2016 14:28:10 GMT</pubDate>
    <dc:creator>Arun_shSAS</dc:creator>
    <dc:date>2016-10-04T14:28:10Z</dc:date>
    <item>
      <title>How to recover last code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/302097#M64013</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have one doubt that suppose I am working in work library.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt;set sasuser.admit;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;session is not ended yet. So, wanted to know that is there any process which let me know for dataset a which code was run ??&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2016 16:56:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/302097#M64013</guid>
      <dc:creator>Arun_shSAS</dc:creator>
      <dc:date>2016-10-03T16:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to recover last code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/302102#M64016</link>
      <description>&lt;P&gt;The answer depends on your SAS environment:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In SAS Studio you can just go to CODE window;&lt;/P&gt;&lt;P&gt;In regular SAS status is displayed on top of program ediror window;&lt;/P&gt;&lt;P&gt;in any SAS O/L environment you can look at the LOG window.&lt;/P&gt;&lt;P&gt;In unix environment you can run on xterm the &lt;STRONG&gt;ps -ef | grep sasexe &lt;/STRONG&gt;command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't think you can answer a question as: which process created work.a table, except&lt;/P&gt;&lt;P&gt;if you can recall last code submitted until 1st time you find a step creating data a;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2016 17:10:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/302102#M64016</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-10-03T17:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to recover last code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/302122#M64030</link>
      <description>Hi, Thanks for your reply. I am thinking if other than log can provide us the information.</description>
      <pubDate>Mon, 03 Oct 2016 18:00:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/302122#M64030</guid>
      <dc:creator>Arun_shSAS</dc:creator>
      <dc:date>2016-10-03T18:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to recover last code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/302165#M64055</link>
      <description>&lt;P&gt;One more possibility: you can save the program name in the dataset label,&lt;/P&gt;&lt;P&gt;by: data a(label="created by program...");&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2016 20:08:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/302165#M64055</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-10-03T20:08:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to recover last code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/302170#M64060</link>
      <description>&lt;P&gt;If you have saved the program file &lt;STRONG&gt;bebore&lt;/STRONG&gt; running&amp;nbsp;then code similar to this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.junk (label=%sysget(SAS_EXECFILENAME));
   set sashelp.class;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;will put the name of the running program file in the data set label. Which can be viewed in the SAS Explorer data set properties or seen in the description column of explorer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But nothing much retroactively.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2016 20:25:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/302170#M64060</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-10-03T20:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to recover last code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/302348#M64138</link>
      <description>&lt;P&gt;Hi, Thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As this approach can help you in the &amp;nbsp;current session.&lt;/P&gt;&lt;P&gt;I just want to know suppose I have created &amp;nbsp;permanent dataset in a library say a.&lt;/P&gt;&lt;P&gt;then after I close the sas&amp;nbsp;session. I want to get a previous log or any other info which tell me which code was submitted to create a dataset a ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 14:28:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/302348#M64138</guid>
      <dc:creator>Arun_shSAS</dc:creator>
      <dc:date>2016-10-04T14:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to recover last code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/302407#M64151</link>
      <description>&lt;P&gt;The code I showed above sets the data set label (or description) if you prefer. It will stay with that value until you change it.&lt;/P&gt;
&lt;P&gt;There is nothing in SAS I am familiar with&amp;nbsp;that will retroactively do what you you want&amp;nbsp; unless, possibly, you implement a source code management system and reference that for which programs create data sets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or use an operating system search tool to look in program files that may reference the data set.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 17:26:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/302407#M64151</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-10-04T17:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to recover last code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/302412#M64154</link>
      <description>&lt;P&gt;I can think of few ways to save traces of work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) you can save the log files, of each run, under name containing a timestamp (date and time) in a dedicated directory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) you can save a dataset and append a record for each run with any desired information&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3) as said before, you can enter upto 240 characters into the dataset label as text, in any format you decide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may think of other solutions depending on your environment.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 17:36:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/302412#M64154</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-10-04T17:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to recover last code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/668090#M200187</link>
      <description>&lt;P&gt;Please don't get me wrong, but I bet you're brazilian, cause you wrote "doubt" instead of "question".&lt;/P&gt;
&lt;P&gt;English speakers will be confused, if you say "doubt", "doubt" is when you're skeptical about something, it's a literal translation from portuguese.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also have this same question, was wondering if it has been satisfactorily answered already.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 16:34:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/668090#M200187</guid>
      <dc:creator>jrsousa2</dc:creator>
      <dc:date>2020-07-09T16:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to recover last code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/668150#M200229</link>
      <description>&lt;P&gt;Way back in the early days of SAS they used to store some code in the SAS dataset.&amp;nbsp; I think you could see it when you ran PROC CONTENTS.&amp;nbsp; I am not sure when it went away. Version 5? Version 6?&amp;nbsp; Not that it was that useful because it would just look something like the data step posted in the original question.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 19:18:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-recover-last-code/m-p/668150#M200229</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-07-09T19:18:41Z</dc:date>
    </item>
  </channel>
</rss>

