<?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 Proc Export in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Proc-Export/m-p/348071#M2243</link>
    <description>&lt;P&gt;Hi There&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to add blank spaces at the end of my exported .csv file.&lt;/P&gt;&lt;P&gt;The csv file is formatted correctly but I cannot get the blank spaces at the end. It stops at 475 but need it to continue to col 600&lt;/P&gt;&lt;P&gt;The data is all concatenated into 1 string and is all converted to text as per&amp;nbsp;attached&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC EXPORT DATA=work.W4NV5KA
OUTFILE="\\xxxx\xxx\xxxx\Test.txt";
DBMS=CSV REPLACE;
PUTNAMES=NO; 
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 07 Apr 2017 13:15:31 GMT</pubDate>
    <dc:creator>Aidan</dc:creator>
    <dc:date>2017-04-07T13:15:31Z</dc:date>
    <item>
      <title>Proc Export</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Proc-Export/m-p/348071#M2243</link>
      <description>&lt;P&gt;Hi There&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to add blank spaces at the end of my exported .csv file.&lt;/P&gt;&lt;P&gt;The csv file is formatted correctly but I cannot get the blank spaces at the end. It stops at 475 but need it to continue to col 600&lt;/P&gt;&lt;P&gt;The data is all concatenated into 1 string and is all converted to text as per&amp;nbsp;attached&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC EXPORT DATA=work.W4NV5KA
OUTFILE="\\xxxx\xxx\xxxx\Test.txt";
DBMS=CSV REPLACE;
PUTNAMES=NO; 
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Apr 2017 13:15:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Proc-Export/m-p/348071#M2243</guid>
      <dc:creator>Aidan</dc:creator>
      <dc:date>2017-04-07T13:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Proc-Export/m-p/348079#M2244</link>
      <description>&lt;P&gt;It sounds like you need a fixed width format instead? But that wouldn't make sense with a comma delimited file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your best bet is a manual export using a data step you can specify the LRECL&amp;nbsp;to indicate your record length.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can start off by using the code generated in the log from your PROC EXPORT and add the LRECL to the FILE statement.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://stats.idre.ucla.edu/sas/faq/how-do-i-write-out-a-file-that-uses-commas-tabs-or-spaces-as-delimiters-to-separate-variables-in-sas/" target="_blank"&gt;http://stats.idre.ucla.edu/sas/faq/how-do-i-write-out-a-file-that-uses-commas-tabs-or-spaces-as-delimiters-to-separate-variables-in-sas/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;File statement docs&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lestmtsref/69738/HTML/default/viewer.htm#n15o12lpyoe4gfn1y1vcp6xs6966.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lestmtsref/69738/HTML/default/viewer.htm#n15o12lpyoe4gfn1y1vcp6xs6966.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 13:24:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Proc-Export/m-p/348079#M2244</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-07T13:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Proc-Export/m-p/348084#M2245</link>
      <description>&lt;P&gt;Do you mean jsut add the LRECL = 650 for example below?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PROC EXPORT DATA=work.W4NV5KA&lt;BR /&gt;OUTFILE="\\xxxx\Test.txt" &lt;FONT color="#FF0000"&gt;LRECL=650&lt;/FONT&gt;&lt;BR /&gt;DBMS=TAB REPLACE;&lt;BR /&gt;PUTNAMES=NO;&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 13:31:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Proc-Export/m-p/348084#M2245</guid>
      <dc:creator>Aidan</dc:creator>
      <dc:date>2017-04-07T13:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Proc-Export/m-p/348086#M2246</link>
      <description>&lt;P&gt;Errm, CSV = Comma Separated Variable file. &amp;nbsp;What does spaces have to do with this? &amp;nbsp;The comma is the delimiter.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 13:31:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Proc-Export/m-p/348086#M2246</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-04-07T13:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Proc-Export/m-p/348090#M2248</link>
      <description>Just seeing if its possible</description>
      <pubDate>Fri, 07 Apr 2017 13:33:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Proc-Export/m-p/348090#M2248</guid>
      <dc:creator>Aidan</dc:creator>
      <dc:date>2017-04-07T13:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Proc-Export/m-p/348092#M2249</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/91103"&gt;@Aidan&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Do you mean jsut add the LRECL = 650 for example below?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;PROC EXPORT DATA=work.W4NV5KA&lt;BR /&gt;OUTFILE="\\xxxx\Test.txt" &lt;FONT color="#FF0000"&gt;LRECL=650&lt;/FONT&gt;&lt;BR /&gt;DBMS=TAB REPLACE;&lt;BR /&gt;PUTNAMES=NO;&lt;BR /&gt;RUN;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;LRECL is not a valid option in PROC EXPORT. I'm not seeing a way to do this using PROC EXPORT. The first link has an example of the data step code. You'd change the LRECL in the FILE statement in the data step.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm assuming that setting the 'string' to a length of 650 didn't automatically give you a length of 650.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 13:38:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Proc-Export/m-p/348092#M2249</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-07T13:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Proc-Export/m-p/348142#M2251</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/91103"&gt;@Aidan&lt;/a&gt; wrote:&lt;BR /&gt;Just seeing if its possible&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Note with proc export. Export is very limited.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2017 15:09:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Proc-Export/m-p/348142#M2251</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-07T15:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Export</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Proc-Export/m-p/348421#M2260</link>
      <description>&lt;P&gt;It is possible. Stupid, but possible.&lt;/P&gt;
&lt;P&gt;Use a FILENAME statement so you can tell SAS that your file should be fixed length.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename csv temp lrecl=30 recfm=f;
proc export data=sashelp.class file=csv replace
  dbms=csv 
;
run;
data _null_;
  infile csv length=len;
  input;
  put _n_ 3. len 3. +1 _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 08 Apr 2017 15:29:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Proc-Export/m-p/348421#M2260</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-04-08T15:29:26Z</dc:date>
    </item>
  </channel>
</rss>

