<?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: SAS DI Studio: &amp;quot;Treat consecutive delimiters as a single delimiter&amp;quot; option is cutting in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-quot-Treat-consecutive-delimiters-as-a-single/m-p/795473#M20237</link>
    <description>&lt;P&gt;Hi Josh - if you're happy with a custom code transform you could try this macro:&amp;nbsp;&lt;A href="https://core.sasjs.io/mp__ds2csv_8sas.html" target="_blank"&gt;https://core.sasjs.io/mp__ds2csv_8sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just tested with this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data withnulls;
   length a b c $1;
   length d e f 8;
   call missing(of _all_);
run;

%mp_ds2csv(withnulls,outref="%sysfunc(pathname(work))/file.csv")

data _null_;
  infile "%sysfunc(pathname(work))/file.csv";
  input;
  putlog _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And it generated this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; A, B, C, D, E, F
 "" ,"" ,"" ,,,&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If the blank space after the null value is a problem, we could get that removed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Feb 2022 13:07:01 GMT</pubDate>
    <dc:creator>AllanBowe</dc:creator>
    <dc:date>2022-02-10T13:07:01Z</dc:date>
    <item>
      <title>SAS DI Studio: "Treat consecutive delimiters as a single delimiter" option is cutting off characters</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-quot-Treat-consecutive-delimiters-as-a-single/m-p/795380#M20236</link>
      <description>&lt;P&gt;Hi All, and thanks in advance!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I recently found out that my File Writer transformation is outputting blank spaces instead of nulls. I need it to be nulls.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="josh_rodriguez_0-1644446557575.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68339iE53156828647AC59/image-size/medium?v=v2&amp;amp;px=400" role="button" title="josh_rodriguez_0-1644446557575.png" alt="josh_rodriguez_0-1644446557575.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;DIV&gt;I've tried several things, but to no avail. The closest thing that's gotten me to where I'm trying to go is to use the "Treat consecutive delimiters as a single delimiter" option on the very first File Reader transformation and then modifying the File Writer transformation code on the "put" section to display the field values without the ""s. And it does the trick.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;However, a big drawback is that it is cutting of the values of 1 or 2 other fields, for some reason. This is odd, because I double and triple-checked the lengths, formats, and informats of said fields on every single transformation and everything is in sync throughout all of the transformations.&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="josh_rodriguez_1-1644446583217.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68340iCE57E8D42C5195FB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="josh_rodriguez_1-1644446583217.png" alt="josh_rodriguez_1-1644446583217.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="josh_rodriguez_2-1644446600301.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68341i489079C35C6C3E4C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="josh_rodriguez_2-1644446600301.png" alt="josh_rodriguez_2-1644446600301.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="josh_rodriguez_3-1644446610692.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68342i3F7D01FD69010FE3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="josh_rodriguez_3-1644446610692.png" alt="josh_rodriguez_3-1644446610692.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="josh_rodriguez_4-1644446618089.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68343i0B56FEC4B0C1C120/image-size/medium?v=v2&amp;amp;px=400" role="button" title="josh_rodriguez_4-1644446618089.png" alt="josh_rodriguez_4-1644446618089.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, thank you for any help you might give this SAS newbie!!!&lt;/P&gt;&lt;P&gt;-Josh&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 09 Feb 2022 22:45:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-quot-Treat-consecutive-delimiters-as-a-single/m-p/795380#M20236</guid>
      <dc:creator>josh_rodriguez</dc:creator>
      <dc:date>2022-02-09T22:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Studio: "Treat consecutive delimiters as a single delimiter" option is cutting</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-quot-Treat-consecutive-delimiters-as-a-single/m-p/795473#M20237</link>
      <description>&lt;P&gt;Hi Josh - if you're happy with a custom code transform you could try this macro:&amp;nbsp;&lt;A href="https://core.sasjs.io/mp__ds2csv_8sas.html" target="_blank"&gt;https://core.sasjs.io/mp__ds2csv_8sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just tested with this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data withnulls;
   length a b c $1;
   length d e f 8;
   call missing(of _all_);
run;

%mp_ds2csv(withnulls,outref="%sysfunc(pathname(work))/file.csv")

data _null_;
  infile "%sysfunc(pathname(work))/file.csv";
  input;
  putlog _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And it generated this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; A, B, C, D, E, F
 "" ,"" ,"" ,,,&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If the blank space after the null value is a problem, we could get that removed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 13:07:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-quot-Treat-consecutive-delimiters-as-a-single/m-p/795473#M20237</guid>
      <dc:creator>AllanBowe</dc:creator>
      <dc:date>2022-02-10T13:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Studio: "Treat consecutive delimiters as a single delimiter" option is cutting</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-quot-Treat-consecutive-delimiters-as-a-single/m-p/795487#M20238</link>
      <description>&lt;P&gt;In your first photograph of the text file you are generating there are a LOT of unneeded quotes. (Why did you post a photograph of text instead of just pasting the text into a text box?)&amp;nbsp; For example the values DCCC_CRJ and 88.78 have quotes around them.&amp;nbsp; Neither of those values contain either commas or quotes, so there was no need to add quotes around them in the CSV file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you ask DI to insert all of those unneeded quotes? If so why?&amp;nbsp; How?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you show what actual SAS code DI generated to create the CSV file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 14:18:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-quot-Treat-consecutive-delimiters-as-a-single/m-p/795487#M20238</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-10T14:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Studio: "Treat consecutive delimiters as a single delimiter" option is cutting</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-quot-Treat-consecutive-delimiters-as-a-single/m-p/797312#M20249</link>
      <description>&lt;P&gt;Thank you for your reply, Allan.&lt;BR /&gt;I was able to solve it. The concatenation function works- that's what I had to use in my Put statement, right before said Put statement.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="josh_rodriguez_0-1645215250948.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68670i7969B66AAB7CA823/image-size/medium?v=v2&amp;amp;px=400" role="button" title="josh_rodriguez_0-1645215250948.png" alt="josh_rodriguez_0-1645215250948.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="josh_rodriguez_1-1645215258365.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68671i447D1FF006CF790D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="josh_rodriguez_1-1645215258365.png" alt="josh_rodriguez_1-1645215258365.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 20:14:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-quot-Treat-consecutive-delimiters-as-a-single/m-p/797312#M20249</guid>
      <dc:creator>josh_rodriguez</dc:creator>
      <dc:date>2022-02-18T20:14:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Studio: "Treat consecutive delimiters as a single delimiter" option is cutting</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-quot-Treat-consecutive-delimiters-as-a-single/m-p/797315#M20250</link>
      <description>&lt;P&gt;Thank you for your reply, Tom.&lt;BR /&gt;I was able to solve it. The concatenation function works- that's what I had to use in my Put statement, right before said Put statement.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="josh_rodriguez_0-1645215307123.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68672i019A78FD20C6828E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="josh_rodriguez_0-1645215307123.png" alt="josh_rodriguez_0-1645215307123.png" /&gt;&lt;/span&gt;&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="josh_rodriguez_1-1645215312952.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68673i0AB14B942BD38721/image-size/medium?v=v2&amp;amp;px=400" role="button" title="josh_rodriguez_1-1645215312952.png" alt="josh_rodriguez_1-1645215312952.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 20:15:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-quot-Treat-consecutive-delimiters-as-a-single/m-p/797315#M20250</guid>
      <dc:creator>josh_rodriguez</dc:creator>
      <dc:date>2022-02-18T20:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DI Studio: "Treat consecutive delimiters as a single delimiter" option is cutting</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-quot-Treat-consecutive-delimiters-as-a-single/m-p/797354#M20251</link>
      <description>&lt;P&gt;So you got it to work?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: You posted photographs of text again.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And you didn't answer why you need to jump through hoops to create such a non-standard file.&amp;nbsp; &lt;STRONG&gt;What is going to read the file that requires all of those unneeded quote characters?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Feb 2022 00:25:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DI-Studio-quot-Treat-consecutive-delimiters-as-a-single/m-p/797354#M20251</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-19T00:25:42Z</dc:date>
    </item>
  </channel>
</rss>

