<?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: Importing a .csv file with a blank column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/456293#M115555</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/142145"&gt;@tomcmacdonald&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Here's what the CSV file looks like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;id,bar
1, 
2, 
3,Joe
4,Steve
5,Henry&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So in that data the first two observations have empty values for BAR.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Is your problem that your dataset does NOT have empty value for BAR in those two cases or that you don't understand how SAS stores character variables?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remember that SAS stores character variables as fixed length.&amp;nbsp; In your original data step one side effect of the INFORMAT statement you used is that BAR will be defined as a character variable of length 64.&amp;nbsp; So observations 1 and 2 should have BAR equal to 64 blanks. Observation 3 will have 'Joe' with 61 trailing blanks. In normal comparisons SAS will ignore the trailing blanks.&amp;nbsp; In PROC SQL SAS will treat a value that is all blanks as NULL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if you store it into an external DBMS as a CHAR(64) instead of a VARCHAR(64) variable then the external DBMS might not treat it as NULL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the issue is that the values are not empty then probably one of these two things happened.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you read the data WITHOUT the TRUNCOVER option on the INFILE statement (or the deprecated MISSOVER option that your posted code is using) then the first two lines would be might have been read as one observation with ID=1 and BAR='2'.&amp;nbsp; Look for note to the effect that SAS went to a new line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your files has other non-printing characters then BAR will have something that looks blank but is not all blanks. Like a null character ('00'x) or a tab ('09'X) or a carriage return ('0D'x) or what microsoft calls a non-breaking space ('A0'x) or a DEL character ('7F'x). Or really anything with an ascii code less than a space ('20'x).&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;</description>
    <pubDate>Sun, 22 Apr 2018 14:20:46 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2018-04-22T14:20:46Z</dc:date>
    <item>
      <title>Importing a .csv file with a blank column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455926#M115415</link>
      <description>&lt;P&gt;Here's what I'm trying to do:&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;DATA FOO;
  INFILE '/path/to/csv/file' DELIMITER = ',' MISSOVER DSD LRECL=32767 FIRSTOBS=2;
  INFORMAT ID 10.;
  INFORMAT BAR :$64.;
  INPUT ID BAR $;
RUN;

PROC SQL;
  CREATE TABLE TEST AS 
  SELECT *
  FROM FOO
  WHERE BAR IS NULL;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Still getting rows with blank BAR columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Checking to see what's in those columns I do this:&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 SQL;
  CREATE TABLE TEST2 AS 
  SELECT
    ID,
    PUT(BAR, $HEX32.)
  FROM FOO&lt;BR /&gt;  WHERE BAR IS NULL;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And it outputs ASCII space characters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OK, what if the original file has some spaces in it.&amp;nbsp; Can I just trim it?&amp;nbsp; Let's see:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA FOO2(KEEP=ID BAR);
  INFILE '/path/to/csv/file' DELIMITER = ',' MISSOVER DSD LRECL=32767 FIRSTOBS=2;
  INFORMAT ID 10.;
  INFORMAT _BAR :$64.;
  INPUT ID _BAR $;
  BAR = TRIM(_BAR);
RUN;

PROC SQL;
  CREATE TABLE TEST3 AS 
  SELECT
    ID,
    PUT(BAR, $HEX32.)
  FROM FOO2&lt;BR /&gt;  WHERE BAR IS NULL;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Nope, apparently not.&amp;nbsp; Same deal.&amp;nbsp; ASCII space characters.&amp;nbsp; TRIM does nothing.&amp;nbsp; How do I kindly tell SAS to input this file and give it appropriate values?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 14:22:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455926#M115415</guid>
      <dc:creator>tomcmacdonald</dc:creator>
      <dc:date>2018-04-20T14:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a .csv file with a blank column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455928#M115416</link>
      <description>&lt;P&gt;What if we were to use PRXCHANGE instead of TRIM?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA FOO3(KEEP=ID BAR);
  INFILE '/path/to/csv/file' DELIMITER = ',' MISSOVER DSD LRECL=32767 FIRSTOBS=2;
  INFORMAT ID 10.;
  INFORMAT _BAR :$64.;
  INPUT ID _BAR $;
  BAR = PRXCHANGE('s/\s+//', -1, _BAR)
RUN;

PROC SQL;
  CREATE TABLE TEST4 AS 
  SELECT
    ID,
    PUT(BAR, $HEX32.)
  FROM FOO3&lt;BR /&gt;  WHERE BAR IS NULL;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Again, it's a no go.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 14:28:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455928#M115416</guid>
      <dc:creator>tomcmacdonald</dc:creator>
      <dc:date>2018-04-20T14:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a .csv file with a blank column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455937#M115420</link>
      <description>&lt;P&gt;What happens with&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  WHERE not missing(bar);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 14:45:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455937#M115420</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-20T14:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a .csv file with a blank column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455938#M115421</link>
      <description>&lt;P&gt;OK here's my solution&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA FOO4(KEEP=ID BAR);
  INFILE '/path/to/csv/file' DELIMITER = ',' MISSOVER DSD LRECL=32767 FIRSTOBS=2;
  INFORMAT ID 10.;
  INFORMAT BAR :$64.;
  INPUT ID BAR $;
  IF NOT PRXMATCH('/^\s+$/', BAR);
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Apr 2018 14:57:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455938#M115421</guid>
      <dc:creator>tomcmacdonald</dc:creator>
      <dc:date>2018-04-20T14:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a .csv file with a blank column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455940#M115422</link>
      <description>Same results.</description>
      <pubDate>Fri, 20 Apr 2018 14:47:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455940#M115422</guid>
      <dc:creator>tomcmacdonald</dc:creator>
      <dc:date>2018-04-20T14:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a .csv file with a blank column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455946#M115424</link>
      <description>&lt;P&gt;You can also use the COMPRESS and all spaces option.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 14:51:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455946#M115424</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-20T14:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a .csv file with a blank column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455963#M115434</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/142145"&gt;@tomcmacdonald&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Here's what I'm trying to do:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Still getting rows with blank BAR columns.&lt;/P&gt;
&lt;P&gt;OK, what if the original file has some spaces in it.&amp;nbsp; Can I just trim it?&amp;nbsp; Let's see:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nope, apparently not.&amp;nbsp; Same deal.&amp;nbsp; ASCII space characters.&amp;nbsp; TRIM does nothing.&amp;nbsp; How do I kindly tell SAS to input this file and give it appropriate values?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Can you post a few lines of your input data file. Or create data step of your set FOO: Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712&lt;/A&gt; will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 15:18:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455963#M115434</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-20T15:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a .csv file with a blank column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455967#M115435</link>
      <description>&lt;P&gt;Here's what the CSV file looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;id,bar
1, 
2, 
3,Joe
4,Steve
5,Henry&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Apr 2018 15:32:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455967#M115435</guid>
      <dc:creator>tomcmacdonald</dc:creator>
      <dc:date>2018-04-20T15:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a .csv file with a blank column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455971#M115437</link>
      <description>&lt;P&gt;I feel as though I'm missing something fundamental wrt SAS and whitespace.&amp;nbsp; Lots of operation apparently don't work.&amp;nbsp; CATT, TRIM, PRXCHANGE with whitespace regular expressions all yield whitespace and seem to do nothing.&amp;nbsp; It's a bit jarring coming from a Python, R environment where this isn't even a thought.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 15:43:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455971#M115437</guid>
      <dc:creator>tomcmacdonald</dc:creator>
      <dc:date>2018-04-20T15:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a .csv file with a blank column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455973#M115439</link>
      <description>&lt;P&gt;SAS doesn't have a NULL value.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 15:46:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455973#M115439</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-20T15:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a .csv file with a blank column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455975#M115440</link>
      <description>&lt;P&gt;What does NULL mean in the context of PROC SQL?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 15:51:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455975#M115440</guid>
      <dc:creator>tomcmacdonald</dc:creator>
      <dc:date>2018-04-20T15:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a .csv file with a blank column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455985#M115448</link>
      <description>&lt;P&gt;SAS doesn't have a concept of null, regardless of SQL or Data Step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In many RDBMS there is a difference between Null, which means nothing, and a space, whereas SAS does not recognize the difference. Both would return a missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: see the response from SAS employee here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/Missing-Null/td-p/33383" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/Missing-Null/td-p/33383&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Apr 2018 16:21:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455985#M115448</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-04-20T16:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a .csv file with a blank column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455988#M115450</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;PRE&gt;DATA FOO;
  INFILE '/path/to/csv/file' DELIMITER = ',' MISSOVER DSD LRECL=32767 FIRSTOBS=2;
  INFORMAT ID 10.;
  INFORMAT BAR $64.;
  INPUT ID BAR $;
RUN;
&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Apr 2018 16:26:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/455988#M115450</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-04-20T16:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a .csv file with a blank column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/456293#M115555</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/142145"&gt;@tomcmacdonald&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Here's what the CSV file looks like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;id,bar
1, 
2, 
3,Joe
4,Steve
5,Henry&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So in that data the first two observations have empty values for BAR.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Is your problem that your dataset does NOT have empty value for BAR in those two cases or that you don't understand how SAS stores character variables?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remember that SAS stores character variables as fixed length.&amp;nbsp; In your original data step one side effect of the INFORMAT statement you used is that BAR will be defined as a character variable of length 64.&amp;nbsp; So observations 1 and 2 should have BAR equal to 64 blanks. Observation 3 will have 'Joe' with 61 trailing blanks. In normal comparisons SAS will ignore the trailing blanks.&amp;nbsp; In PROC SQL SAS will treat a value that is all blanks as NULL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if you store it into an external DBMS as a CHAR(64) instead of a VARCHAR(64) variable then the external DBMS might not treat it as NULL.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the issue is that the values are not empty then probably one of these two things happened.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you read the data WITHOUT the TRUNCOVER option on the INFILE statement (or the deprecated MISSOVER option that your posted code is using) then the first two lines would be might have been read as one observation with ID=1 and BAR='2'.&amp;nbsp; Look for note to the effect that SAS went to a new line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your files has other non-printing characters then BAR will have something that looks blank but is not all blanks. Like a null character ('00'x) or a tab ('09'X) or a carriage return ('0D'x) or what microsoft calls a non-breaking space ('A0'x) or a DEL character ('7F'x). Or really anything with an ascii code less than a space ('20'x).&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;</description>
      <pubDate>Sun, 22 Apr 2018 14:20:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/456293#M115555</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-04-22T14:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a .csv file with a blank column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/456347#M115575</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/142145"&gt;@tomcmacdonald&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Below code returns the expected result. What are you doing differently in your code?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data foo3(keep=id bar);
  infile datalines delimiter = ',' missover dsd /*lrecl=32767*/ firstobs=2;
  INFORMAT ID 10.;
  INFORMAT BAR $64.;
  INPUT ID BAR ;
  datalines;
id,bar
1, 
2, 
3,Joe
4,Steve
5,Henry
;
run;

proc sql feedback;
  create table test4 as 
  select
    id,
    bar
  from foo3  
  where bar is not null;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Please note that using the column modifier in the INFORMAT statement isn't valid syntax. You only use this modifier on the INPUT statement to distinguish formats from same named informats. You also shouldn't use the $ in your input statement as this is going to overwrite your informat definition for BAR.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS doesn't have a concept of NULL but you still can use the NULL keyword in the SAS SQL flavor. SAS will then treat such a NULL the same as a missing. In SAS SQL the syntax &lt;FONT color="#339966"&gt;&lt;EM&gt;bar is not NULL&lt;/EM&gt;&lt;/FONT&gt; is equivalent to &lt;FONT color="#339966"&gt;&lt;EM&gt;bar ne ' '&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 00:05:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/456347#M115575</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-04-23T00:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a .csv file with a blank column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/456402#M115598</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;You only use this modifier on the INPUT statement to distinguish formats from same named informats. You also shouldn't use the $ in your input statement as this is going to overwrite your informat definition for BAR.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;The colon modifier on an INPUT statement has nothing to do with formats. It is instructions to INPUT to ignore the width of the informat and instead just read the data using list mode, even if there is an informat specification in the INPUT statement.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The $ in the INPUT statement is doing no harm, but it is also not doing any good. The meaning of the bare $ in the INPUT statement is that SAS should default the referenced variable to be character.&amp;nbsp; But in that data step the both variables had already had their type determined as a side effect of appearing in an earlier INFORMAT statement.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Apr 2018 05:22:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/456402#M115598</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-04-23T05:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Importing a .csv file with a blank column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/456426#M115606</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Thanks and true, I've got the explanation for the colon modifier used in the INPUT statement wrong.&lt;/P&gt;
&lt;P&gt;Nevertheless in the code the OP posted the colon modifier has been used in the INFORMAT statement which to my astonishment didn't even generate a warning in the Log. BUT: It makes a difference to the data type created (numeric) AND using the $ in the INPUT statement in combination does make a difference as well (as now it becomes character).&lt;/P&gt;
&lt;P&gt;Using the colon for &lt;FONT face="courier new,courier"&gt;INFORMAT BAR &lt;FONT size="3"&gt;&lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;$64.;&lt;/FONT&gt; actually behaves as if this statement didn't get executed at all. Play around with it and you'll see.&lt;/P&gt;
&lt;PRE&gt;data foo3(keep=id bar);
  infile datalines delimiter = ',' missover dsd /*lrecl=32767*/ firstobs=2;
  INFORMAT ID 10.;
  INFORMAT BAR :$64.;
  INPUT ID BAR $;
  datalines;
id,bar
1, 
2, 
3,Joe
4,Steve
5,Henry
;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Apr 2018 08:51:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Importing-a-csv-file-with-a-blank-column/m-p/456426#M115606</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-04-23T08:51:08Z</dc:date>
    </item>
  </channel>
</rss>

