<?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: DS2 question in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/DS2-question/m-p/537509#M147838</link>
    <description>&lt;P&gt;PROC DSTRANS is undocumented because it is only intended for back-end use by other SAS procedures in very specific cases. In SAS 9.4 M6, &lt;A href="https://go.documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=p05qb7pgqun5urn18bahx1vt640s.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;PROC DSTODS2&lt;/A&gt; is a documented procedure designed to help SAS users translate DATA step code to DS2. I wrote &lt;A href="https://blogs.sas.com/content/sastraining/2018/03/26/jedi-sas-tricks-the-dstods2-procedure/" target="_self"&gt;a blog post&lt;/A&gt; about this a while back.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One limitation is that both the original program file and the output file must reside in the current SAS default directory. In some client-server deployments, you won't have write permission to the SAS default directory. You can work around this by using the base SAS &lt;A href="https://go.documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p1cjn9slqm22q7n1exa9ba8ydjce.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;DLGCDIR&lt;/A&gt; function to set the default directory to a location where you do have write access.&amp;nbsp; For example, if you were working in SAS on a Windows server and have write access to the c:\temp directory, you would save your DATA step program to C:\temp, then run code like this to make the translation:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put %qsysfunc(dlgcdir(c:\temp));
PROC DSTODS2 IN="datastep.sas"
            OUT="ds2program.sas";
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Mark&lt;/P&gt;</description>
    <pubDate>Thu, 21 Feb 2019 19:52:38 GMT</pubDate>
    <dc:creator>SASJedi</dc:creator>
    <dc:date>2019-02-21T19:52:38Z</dc:date>
    <item>
      <title>DS2 question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DS2-question/m-p/537295#M147749</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have successfully run a 'proc dstrans' to convert data step code to DS2. The only query I have is there are some lines of code which start with a hash (#).&lt;/P&gt;&lt;P&gt;&amp;nbsp;e.g.&amp;nbsp;&lt;/P&gt;&lt;P&gt;#_local _P1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this a comment? It doesn't seem to do anything so I am assuming it is a comment. Can't find it in DS2 doco though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 04:10:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DS2-question/m-p/537295#M147749</guid>
      <dc:creator>MartinBoland</dc:creator>
      <dc:date>2019-02-21T04:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: DS2 question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DS2-question/m-p/537509#M147838</link>
      <description>&lt;P&gt;PROC DSTRANS is undocumented because it is only intended for back-end use by other SAS procedures in very specific cases. In SAS 9.4 M6, &lt;A href="https://go.documentation.sas.com/?docsetId=proc&amp;amp;docsetTarget=p05qb7pgqun5urn18bahx1vt640s.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;PROC DSTODS2&lt;/A&gt; is a documented procedure designed to help SAS users translate DATA step code to DS2. I wrote &lt;A href="https://blogs.sas.com/content/sastraining/2018/03/26/jedi-sas-tricks-the-dstods2-procedure/" target="_self"&gt;a blog post&lt;/A&gt; about this a while back.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One limitation is that both the original program file and the output file must reside in the current SAS default directory. In some client-server deployments, you won't have write permission to the SAS default directory. You can work around this by using the base SAS &lt;A href="https://go.documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p1cjn9slqm22q7n1exa9ba8ydjce.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;DLGCDIR&lt;/A&gt; function to set the default directory to a location where you do have write access.&amp;nbsp; For example, if you were working in SAS on a Windows server and have write access to the c:\temp directory, you would save your DATA step program to C:\temp, then run code like this to make the translation:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put %qsysfunc(dlgcdir(c:\temp));
PROC DSTODS2 IN="datastep.sas"
            OUT="ds2program.sas";
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Thu, 21 Feb 2019 19:52:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DS2-question/m-p/537509#M147838</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2019-02-21T19:52:38Z</dc:date>
    </item>
  </channel>
</rss>

