<?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: Exporting data error in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Exporting-data-error/m-p/23520#M5210</link>
    <description>if _n_ = 1 put "header 1" "header 2" "header3";&lt;BR /&gt;
&lt;BR /&gt;
is a minimal way to get something as a header.</description>
    <pubDate>Mon, 07 Mar 2011 22:27:10 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2011-03-07T22:27:10Z</dc:date>
    <item>
      <title>Exporting data error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Exporting-data-error/m-p/23515#M5205</link>
      <description>Hi ,&lt;BR /&gt;
I need to export it to text file.While exporting am not getting any headers on the text file. If i use proc export am not getting variables on proper order.&lt;BR /&gt;
Can you let me know wht to add on the code to get an header while using data_null step.&lt;BR /&gt;
&lt;BR /&gt;
data _null_;&lt;BR /&gt;
        &lt;BR /&gt;
        set Class;&lt;BR /&gt;
		file "&amp;amp;drv2\ABC\ABC6_Class.txt"  dlm="||";&lt;BR /&gt;
&lt;BR /&gt;
	    put  compno clamno2 lineno 			 ;&lt;BR /&gt;
    run;&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance !!</description>
      <pubDate>Mon, 07 Mar 2011 18:10:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Exporting-data-error/m-p/23515#M5205</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-03-07T18:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting data error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Exporting-data-error/m-p/23516#M5206</link>
      <description>Hello Raveenat,&lt;BR /&gt;
&lt;BR /&gt;
To get a desired order one can use the RETAIN statement before SET like this:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data _null_;&lt;BR /&gt;
  retain compno clamno2 lineno;&lt;BR /&gt;
  set Class;&lt;BR /&gt;
  file "&amp;amp;drv2\ABC\ABC6_Class.txt" dlm="||";&lt;BR /&gt;
  put compno clamno2 lineno;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
Sincerely,&lt;BR /&gt;
SPR</description>
      <pubDate>Mon, 07 Mar 2011 19:16:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Exporting-data-error/m-p/23516#M5206</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2011-03-07T19:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting data error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Exporting-data-error/m-p/23517#M5207</link>
      <description>Hi SPR,&lt;BR /&gt;
&lt;BR /&gt;
My intention is to get an header while exporting using data _null_ step.&lt;BR /&gt;
If i use proc export , then the variables are not on the desirable order.&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Mon, 07 Mar 2011 19:30:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Exporting-data-error/m-p/23517#M5207</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-03-07T19:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting data error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Exporting-data-error/m-p/23518#M5208</link>
      <description>Did you try retain?</description>
      <pubDate>Mon, 07 Mar 2011 20:17:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Exporting-data-error/m-p/23518#M5208</guid>
      <dc:creator>SPR</dc:creator>
      <dc:date>2011-03-07T20:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting data error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Exporting-data-error/m-p/23519#M5209</link>
      <description>Yes SPR I tried as below code, but am not getting an header&lt;BR /&gt;
&lt;BR /&gt;
data class;&lt;BR /&gt;
input var1 var2 var3;&lt;BR /&gt;
cards;&lt;BR /&gt;
1 2 3&lt;BR /&gt;
4 5 6&lt;BR /&gt;
7 8 9&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
data _null_;  &lt;BR /&gt;
retain var1 var2 var3;  &lt;BR /&gt;
set Class;  &lt;BR /&gt;
file "C:\Documents and Settings\Desktop\output.txt" dlm="||"; &lt;BR /&gt;
put var1 var2 var3;&lt;BR /&gt;
run;</description>
      <pubDate>Mon, 07 Mar 2011 20:41:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Exporting-data-error/m-p/23519#M5209</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-03-07T20:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting data error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Exporting-data-error/m-p/23520#M5210</link>
      <description>if _n_ = 1 put "header 1" "header 2" "header3";&lt;BR /&gt;
&lt;BR /&gt;
is a minimal way to get something as a header.</description>
      <pubDate>Mon, 07 Mar 2011 22:27:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Exporting-data-error/m-p/23520#M5210</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2011-03-07T22:27:10Z</dc:date>
    </item>
  </channel>
</rss>

