<?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 Is there any way to store the source code of SAS Utility Macro(%DS2CSV) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-store-the-source-code-of-SAS-Utility-Macro/m-p/160492#M31236</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The source code of %ds2csv macro is stored in Application dispatcher.&lt;/P&gt;&lt;P&gt;In the following example, the %COPY statement writes the stored source code to the SAS log:&lt;/P&gt;&lt;P&gt;%macro foobar(arg) /store source&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; des="This macro does not do much";&lt;/P&gt;&lt;P&gt;%put arg = &amp;amp;arg;&lt;/P&gt;&lt;P&gt;%mend&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%copy foobar/source;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What If I'm using the Utility macro %DS2CSV, for example&lt;/P&gt;&lt;P&gt;%ds2csv (data=sashelp.retail, runmode=b, csvfile=.\retail.csv);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I tried using below, im facing the following error,&lt;/P&gt;&lt;P&gt;%copy ds2csv/source;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: /source option is not included in the macro ds2csv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I tried to find the source code of %ds2csv, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DS2CSV CSV File&lt;/P&gt;&lt;P&gt;Generator&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;webcsv1.sas,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;webcsv1.html&lt;/P&gt;&lt;P&gt;This sample program uses the DS2CSV macro to convert&lt;/P&gt;&lt;P&gt;any SAS data set to a comma separated variable file to be&lt;/P&gt;&lt;P&gt;downloaded to the browser&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Feb 2015 06:37:39 GMT</pubDate>
    <dc:creator>Manu_SAS</dc:creator>
    <dc:date>2015-02-10T06:37:39Z</dc:date>
    <item>
      <title>Is there any way to store the source code of SAS Utility Macro(%DS2CSV)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-store-the-source-code-of-SAS-Utility-Macro/m-p/160492#M31236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The source code of %ds2csv macro is stored in Application dispatcher.&lt;/P&gt;&lt;P&gt;In the following example, the %COPY statement writes the stored source code to the SAS log:&lt;/P&gt;&lt;P&gt;%macro foobar(arg) /store source&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; des="This macro does not do much";&lt;/P&gt;&lt;P&gt;%put arg = &amp;amp;arg;&lt;/P&gt;&lt;P&gt;%mend&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%copy foobar/source;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What If I'm using the Utility macro %DS2CSV, for example&lt;/P&gt;&lt;P&gt;%ds2csv (data=sashelp.retail, runmode=b, csvfile=.\retail.csv);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I tried using below, im facing the following error,&lt;/P&gt;&lt;P&gt;%copy ds2csv/source;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: /source option is not included in the macro ds2csv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I tried to find the source code of %ds2csv, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DS2CSV CSV File&lt;/P&gt;&lt;P&gt;Generator&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;webcsv1.sas,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;webcsv1.html&lt;/P&gt;&lt;P&gt;This sample program uses the DS2CSV macro to convert&lt;/P&gt;&lt;P&gt;any SAS data set to a comma separated variable file to be&lt;/P&gt;&lt;P&gt;downloaded to the browser&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 06:37:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-store-the-source-code-of-SAS-Utility-Macro/m-p/160492#M31236</guid>
      <dc:creator>Manu_SAS</dc:creator>
      <dc:date>2015-02-10T06:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way to store the source code of SAS Utility Macro(%DS2CSV)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-store-the-source-code-of-SAS-Utility-Macro/m-p/160493#M31237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are different options when compiling a macro &lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/68140/HTML/default/viewer.htm#p1nypovnwon4uyn159rst8pgzqrl.htm" title="http://support.sas.com/documentation/cdl/en/mcrolref/68140/HTML/default/viewer.htm#p1nypovnwon4uyn159rst8pgzqrl.htm"&gt;SAS(R) 9.4 Macro Language: Reference, Third Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using "source" will store the source code with the compiled macro so it can easily be retrieved. On the other hand using "secure" will make it almost impossible for you to retrieve the source code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 10:13:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-store-the-source-code-of-SAS-Utility-Macro/m-p/160493#M31237</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-02-10T10:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way to store the source code of SAS Utility Macro(%DS2CSV)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-store-the-source-code-of-SAS-Utility-Macro/m-p/160494#M31238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patrick,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, went through the SASROOT directory(Unix SAS 9.4). Under SASAUTOS, we have the ds2csv.sas code. Copied to my home directory, modified by adding "/store source" in %macro statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus, ERROR resolved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Manohar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 12:01:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-store-the-source-code-of-SAS-Utility-Macro/m-p/160494#M31238</guid>
      <dc:creator>Manu_SAS</dc:creator>
      <dc:date>2015-02-10T12:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way to store the source code of SAS Utility Macro(%DS2CSV)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-store-the-source-code-of-SAS-Utility-Macro/m-p/160495#M31239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want this as a permanent solution for everybody then you could also extend the SASAUTOS paths with an additional directory (as first directory) and then store the amended copy of ds2csv.sas there. SAS will then pick-up this "overlay" version as it finds it first.&lt;/P&gt;&lt;P&gt;The disadvantage of such an approach is of course that this macro will never get updated when upgrading to a newer SAS version.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 19:59:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-store-the-source-code-of-SAS-Utility-Macro/m-p/160495#M31239</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-02-10T19:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Is there any way to store the source code of SAS Utility Macro(%DS2CSV)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-store-the-source-code-of-SAS-Utility-Macro/m-p/160496#M31240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to use %COPY to view the source code of a macro if the macro was delivered in a compiled catalog.&amp;nbsp; But DS2CSV and other supplied SAS macro are delivered as source files.&amp;nbsp; &lt;/P&gt;&lt;P&gt;So you don't need to se %COPY, just read the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile sasautos('ds2csv.sas');&lt;/P&gt;&lt;P&gt;&amp;nbsp; input;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put _infile_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Feb 2015 00:28:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-any-way-to-store-the-source-code-of-SAS-Utility-Macro/m-p/160496#M31240</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-02-11T00:28:35Z</dc:date>
    </item>
  </channel>
</rss>

