<?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: Quote function and format giving 3 double quotes when we output using proc export in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Quote-function-and-format-giving-3-double-quotes-when-we-output/m-p/525065#M142846</link>
    <description>&lt;P&gt;You're not getting what you think from QUOTE function.&amp;nbsp; READ THE DOCUMENTATION.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;QUOTE quotes the entire value including&amp;nbsp;trailing&amp;nbsp;blanks&amp;nbsp;and when the value is assigned back the variable length is not sufficient.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 294px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26040i6773F87093AC282A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Jan 2019 15:24:47 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2019-01-07T15:24:47Z</dc:date>
    <item>
      <title>Quote function and format giving 3 double quotes when we output using proc export</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Quote-function-and-format-giving-3-double-quotes-when-we-output/m-p/525044#M142839</link>
      <description>&lt;P&gt;We have a requirement to enclose a variable values in double quotes and output a txt file.&lt;BR /&gt;To do that we have used quote function and also quote format. They look fine in the SAS but when we output using proc export its giving the 3 double quotes instead of single double quote before and after the variable value.&lt;/P&gt;&lt;P&gt;We are using the below code as example:&lt;BR /&gt;data fr;&lt;BR /&gt;set sashelp.cars;&lt;BR /&gt;/*format model quote.;*/&lt;/P&gt;&lt;P&gt;model=quote(model);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;filename test 'path\T1.txt' ;&lt;BR /&gt;proc export data = fr&lt;BR /&gt;outfile = test&lt;BR /&gt;DBMS=tab REPLACE;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Expected variable value- "value"&lt;BR /&gt;Quote function result -"""value"&lt;BR /&gt;Quote format result-"""value"""&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jan 2019 14:53:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Quote-function-and-format-giving-3-double-quotes-when-we-output/m-p/525044#M142839</guid>
      <dc:creator>vijay1</dc:creator>
      <dc:date>2019-01-07T14:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Quote function and format giving 3 double quotes when we output using proc export</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Quote-function-and-format-giving-3-double-quotes-when-we-output/m-p/525064#M142845</link>
      <description>&lt;P&gt;Fascinating: proc exports quotes the quotes. Same happens, when using the quote-format in a datastep using file and put to export the data. Using quote + strip seems to create the expected result.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   set sashelp.cars;
   file "PATH\T1.txt";
   length Buffer $ 250;

   Buffer = catx('09'x,  Make,  quote(strip(Model)), Type, Origin, DriveTrain, MSRP, Invoice,
      EngineSize, Cylinders, Horsepower, MPG_City, MPG_Highway, Weight, Wheelbase, Length);

   put Buffer;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Jan 2019 15:22:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Quote-function-and-format-giving-3-double-quotes-when-we-output/m-p/525064#M142845</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-01-07T15:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Quote function and format giving 3 double quotes when we output using proc export</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Quote-function-and-format-giving-3-double-quotes-when-we-output/m-p/525065#M142846</link>
      <description>&lt;P&gt;You're not getting what you think from QUOTE function.&amp;nbsp; READ THE DOCUMENTATION.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;QUOTE quotes the entire value including&amp;nbsp;trailing&amp;nbsp;blanks&amp;nbsp;and when the value is assigned back the variable length is not sufficient.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 294px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26040i6773F87093AC282A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jan 2019 15:24:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Quote-function-and-format-giving-3-double-quotes-when-we-output/m-p/525065#M142846</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2019-01-07T15:24:47Z</dc:date>
    </item>
  </channel>
</rss>

