<?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: Removing blank space in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465524#M20994</link>
    <description>&lt;P&gt;If there's nothing particularly special about your export, any reason to not use PROC EXPORT?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc export data=sashelp.class outfile=filename dbms=csv replace;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/212379"&gt;@FLINT&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I am creating CSV file from sas dataset using following code&lt;BR /&gt;&lt;BR /&gt;Data _null_;&lt;BR /&gt;set dataset;&lt;BR /&gt;File "filename" DLM=',';&lt;BR /&gt;if _n_ eq 1 then do&lt;BR /&gt;****&lt;BR /&gt;****&lt;BR /&gt;Put 'A,B,C';&lt;BR /&gt;End;&lt;BR /&gt;PUt A B C;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Problem is that a blank space is introduced in fileds with null values.&lt;BR /&gt;&lt;BR /&gt;Please help how to avoid that.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 May 2018 20:47:10 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-05-28T20:47:10Z</dc:date>
    <item>
      <title>Removing blank space</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465482#M20986</link>
      <description>I am creating CSV file from sas dataset using following code&lt;BR /&gt;&lt;BR /&gt;Data _null_;&lt;BR /&gt;set dataset;&lt;BR /&gt;File "filename" DLM=',';&lt;BR /&gt;if _n_ eq 1 then do&lt;BR /&gt;****&lt;BR /&gt;****&lt;BR /&gt;Put 'A,B,C';&lt;BR /&gt;End;&lt;BR /&gt;PUt A B C;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Problem is that a blank space is introduced in fileds with null values.&lt;BR /&gt;&lt;BR /&gt;Please help how to avoid that.</description>
      <pubDate>Mon, 28 May 2018 14:17:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465482#M20986</guid>
      <dc:creator>FLINT</dc:creator>
      <dc:date>2018-05-28T14:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Removing blank space</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465486#M20988</link>
      <description>&lt;P&gt;Please provider some sample data and the full code your using or use sample SAS datasets as below. It's something to do with your data or code you have.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Filename out_CSV "\Output\out_file.csv";
Data _null_;
set sashelp.class;
File out_CSV DLM=',';
PUT Name Age Sex Height Weight;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 14:49:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465486#M20988</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-05-28T14:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Removing blank space</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465494#M20989</link>
      <description>Surya ,&lt;BR /&gt;I am the same code and the data set is like&lt;BR /&gt;Column Ais Bank_code&lt;BR /&gt;B is PAN_Number&lt;BR /&gt;C is party_name&lt;BR /&gt;Here The problem is that some of the pan numbers are missing where where blank space is getting populated instead of null</description>
      <pubDate>Mon, 28 May 2018 15:06:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465494#M20989</guid>
      <dc:creator>FLINT</dc:creator>
      <dc:date>2018-05-28T15:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: Removing blank space</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465501#M20990</link>
      <description>&lt;P&gt;Instead of writing individual variables, create a string with like delimited and write that string to file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
set sashelp.class;
If sex="M" then call missing(Sex);
run;
Filename out_CSV "\Output\out_file.csv";
Data _NULL_;
set Have;
File out_CSV DLM=',';
out_Line=CATS(Name,",",Sex,",",Age,",",Height,",",Weight);
PUT out_Line;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 May 2018 16:12:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465501#M20990</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-05-28T16:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Removing blank space</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465508#M20991</link>
      <description>&lt;P&gt;Get rid of the delimiter, and code it yourself:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Data _null_;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set dataset;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;File "filename" noprint;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if _n_ eq 1 then do&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;****&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;****&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Put 'A,B,C';&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;PUt A +(-1) ','&amp;nbsp; B +(-1) ','&amp;nbsp; C;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;However, this method runs into trouble when A or B has a format associated with it.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 16:56:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465508#M20991</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-05-28T16:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: Removing blank space</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465511#M20992</link>
      <description>&lt;P&gt;That is what the DSD option on the FILE statement if for.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  input a b c ;
cards;
1 2 3
4 . 6
. . 7
;
data _null_;
  set have;
  file log dsd dlm=',';
  put a b c;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Results&lt;/P&gt;
&lt;PRE&gt;1,2,3
4,,6
,,7&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 17:24:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465511#M20992</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-05-28T17:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Removing blank space</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465524#M20994</link>
      <description>&lt;P&gt;If there's nothing particularly special about your export, any reason to not use PROC EXPORT?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc export data=sashelp.class outfile=filename dbms=csv replace;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/212379"&gt;@FLINT&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I am creating CSV file from sas dataset using following code&lt;BR /&gt;&lt;BR /&gt;Data _null_;&lt;BR /&gt;set dataset;&lt;BR /&gt;File "filename" DLM=',';&lt;BR /&gt;if _n_ eq 1 then do&lt;BR /&gt;****&lt;BR /&gt;****&lt;BR /&gt;Put 'A,B,C';&lt;BR /&gt;End;&lt;BR /&gt;PUt A B C;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;Problem is that a blank space is introduced in fileds with null values.&lt;BR /&gt;&lt;BR /&gt;Please help how to avoid that.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 20:47:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465524#M20994</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-05-28T20:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Removing blank space</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465594#M20995</link>
      <description>Bingo..it worked wonders....thanks&lt;BR /&gt;</description>
      <pubDate>Tue, 29 May 2018 05:12:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465594#M20995</guid>
      <dc:creator>FLINT</dc:creator>
      <dc:date>2018-05-29T05:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Removing blank space</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465598#M20996</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt; I m not using export cause I have to use macro variable in the header of the CSV file</description>
      <pubDate>Tue, 29 May 2018 05:39:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Removing-blank-space/m-p/465598#M20996</guid>
      <dc:creator>FLINT</dc:creator>
      <dc:date>2018-05-29T05:39:46Z</dc:date>
    </item>
  </channel>
</rss>

