<?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: How to change a HEX Value in a csv file in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-HEX-Value-in-a-csv-file/m-p/868161#M342919</link>
    <description>&lt;P&gt;Thank you so much!!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This worked&lt;/P&gt;</description>
    <pubDate>Wed, 05 Apr 2023 09:26:51 GMT</pubDate>
    <dc:creator>MILKYLOVE</dc:creator>
    <dc:date>2023-04-05T09:26:51Z</dc:date>
    <item>
      <title>How to change a HEX Value in a csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-HEX-Value-in-a-csv-file/m-p/867395#M342577</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a program that creates a csv file. When I open this csv file in ultra edit, I get a hex value of '00' in certain columns. (see image below), that is '.....'&lt;/P&gt;&lt;P&gt;I want to change these to blanks (hex value 20). How can I make this conversion only on these specific hex values?&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="MILKYLOVE_0-1680264266307.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82226i896FB08374ED3A6B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MILKYLOVE_0-1680264266307.png" alt="MILKYLOVE_0-1680264266307.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 12:04:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-HEX-Value-in-a-csv-file/m-p/867395#M342577</guid>
      <dc:creator>MILKYLOVE</dc:creator>
      <dc:date>2023-03-31T12:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a HEX Value in a csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-HEX-Value-in-a-csv-file/m-p/867396#M342578</link>
      <description>&lt;P&gt;We can only be of help if we see the code which is creating this file. If display formats are not part of the export code, also show the format assigned to that particular variable in the dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, anybody with excess time can reconstruct your blacked-out strings from the hex codes &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 09:00:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-HEX-Value-in-a-csv-file/m-p/867396#M342578</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-03-31T09:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a HEX Value in a csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-HEX-Value-in-a-csv-file/m-p/867402#M342582</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply. Please find the code below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%&lt;STRONG&gt;&lt;EM&gt;ds2csv&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(data = work.SOLUTION2, runmode = b, csvfile= &amp;amp;RacineRun.&amp;amp;RacineIV./fichiers/solution_2.csv, sepchar = 3B, colhead=y, formats=y, labels=n );&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 09:40:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-HEX-Value-in-a-csv-file/m-p/867402#M342582</guid>
      <dc:creator>MILKYLOVE</dc:creator>
      <dc:date>2023-03-31T09:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a HEX Value in a csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-HEX-Value-in-a-csv-file/m-p/867426#M342598</link>
      <description>Also the format is character</description>
      <pubDate>Fri, 31 Mar 2023 12:03:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-HEX-Value-in-a-csv-file/m-p/867426#M342598</guid>
      <dc:creator>MILKYLOVE</dc:creator>
      <dc:date>2023-03-31T12:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a HEX Value in a csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-HEX-Value-in-a-csv-file/m-p/867427#M342599</link>
      <description>Also the format is character</description>
      <pubDate>Fri, 31 Mar 2023 12:03:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-HEX-Value-in-a-csv-file/m-p/867427#M342599</guid>
      <dc:creator>MILKYLOVE</dc:creator>
      <dc:date>2023-03-31T12:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a HEX Value in a csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-HEX-Value-in-a-csv-file/m-p/867490#M342622</link>
      <description>&lt;P&gt;(Corrected)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The macro will export data "as is", so you have these hex zero's in your data. You need to investigate this.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 16:18:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-HEX-Value-in-a-csv-file/m-p/867490#M342622</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-03-31T16:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a HEX Value in a csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-HEX-Value-in-a-csv-file/m-p/867491#M342623</link>
      <description>&lt;P&gt;%DS2CSV is just going to write the values in the dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To change one character to another you can use the TRANSLATE() function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SO if the binary zeros are in the variable XXX you could use a data step like this to create a new dataset with the zeros replaced with spaces.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  xxx=translate(xxx,' ','00'x);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you have such bytes in multiple variables then use an array:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  array __c _character_;
  do over __c;
    __c=translate(__c,' ','00'x);
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Once you have a dataset without the binary zeros then you can write a CSV file that will not have binary zeros.&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2023 16:11:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-HEX-Value-in-a-csv-file/m-p/867491#M342623</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-03-31T16:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a HEX Value in a csv file</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-HEX-Value-in-a-csv-file/m-p/868161#M342919</link>
      <description>&lt;P&gt;Thank you so much!!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This worked&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 09:26:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-a-HEX-Value-in-a-csv-file/m-p/868161#M342919</guid>
      <dc:creator>MILKYLOVE</dc:creator>
      <dc:date>2023-04-05T09:26:51Z</dc:date>
    </item>
  </channel>
</rss>

