<?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 Blank space in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618637#M181511</link>
    <description>&lt;P&gt;How do you get the file, and how do you read it? Dealing with EBCDIC-coded data can be tricky on another platform.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jan 2020 18:08:44 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-01-20T18:08:44Z</dc:date>
    <item>
      <title>SAS Blank space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618505#M181467</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;iam trying to filter the column where flg not missing.&lt;BR /&gt;but iam still getting blank values whose records does not have flag.&lt;BR /&gt;i tried compress(flg) and strip(flg) options.but not wotking.&lt;BR /&gt;please help.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 12:29:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618505#M181467</guid>
      <dc:creator>JJP1</dc:creator>
      <dc:date>2020-01-20T12:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Blank space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618509#M181470</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/256123"&gt;@JJP1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Coud you please share a portion of your data and the code you tried?&lt;/P&gt;
&lt;P&gt;Did you tried then NMISS() function to filter you data for example?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 12:53:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618509#M181470</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-01-20T12:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Blank space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618510#M181471</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you may have a non printable character in your flg variable,&amp;nbsp;try to analyse which values it contains:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set have;

   do i=1 to length(flg);
      rank=rank(substr(flg,i,1));
      output;
   end;
run;
proc print;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Jan 2020 13:07:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618510#M181471</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2020-01-20T13:07:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Blank space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618520#M181479</link>
      <description>&lt;PRE&gt;data want;
   set have;
if not anyspace(flg);
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Jan 2020 13:46:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618520#M181479</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-01-20T13:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Blank space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618522#M181481</link>
      <description>&lt;P&gt;Along the same lines as what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/77163"&gt;@Oligolas&lt;/a&gt;&amp;nbsp;has said about there potentially being non-printable characters in the &lt;FONT face="courier new,courier"&gt;flg&lt;/FONT&gt; variable, you could try something like the following code after you've filtered your data and if you get some records in the &lt;FONT face="courier new,courier"&gt;have&lt;/FONT&gt; data set then those are the ones that have non-printable characters. Your original data will have have to either be read in correctly or pre-processed to remove the non-printable characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code removes printable characters and checks if the result is blank.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set have;
   flg2 = compress(flg,,'w');
   if flg2 ne '';
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Amir.&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>Mon, 20 Jan 2020 13:51:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618522#M181481</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2020-01-20T13:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Blank space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618568#M181483</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;actually i need to do it using proc sql option please and iam trying below option and it says that " Variable Flg not appended because of type mismatch."would you please help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;   proc sql;
      create table work.W5II6SX as
         select
            
               
            (anyspace(Flg )) asFlg length = 1
      from &amp;amp;etls_lastTable
      ;
   quit;
   
   %let SYSLAST = work.W5II6SX;
   
   %let etls_lastTable = &amp;amp;SYSLAST; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Jan 2020 15:10:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618568#M181483</guid>
      <dc:creator>JJP1</dc:creator>
      <dc:date>2020-01-20T15:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Blank space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618570#M181484</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/77163"&gt;@Oligolas&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;i ran below code and i can see Y or N.how can i find out non printable character and resolve the issue please.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want(keep=flg);
   set have

   do i=1 to length(flg);
      rank=rank(substr(flg,i,1));
      output;
   end;
run;
proc print;run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Jan 2020 15:16:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618570#M181484</guid>
      <dc:creator>JJP1</dc:creator>
      <dc:date>2020-01-20T15:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Blank space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618571#M181485</link>
      <description>&lt;P&gt;Actually iam getting these values from mainframe application in the form of text file.whether the mainframe is causing the issue and sending some incorrect data please .&lt;/P&gt;&lt;P&gt;no data is showing just blank spaces i can see.please help&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 15:18:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618571#M181485</guid>
      <dc:creator>JJP1</dc:creator>
      <dc:date>2020-01-20T15:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Blank space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618637#M181511</link>
      <description>&lt;P&gt;How do you get the file, and how do you read it? Dealing with EBCDIC-coded data can be tricky on another platform.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 18:08:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618637#M181511</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-01-20T18:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Blank space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618645#M181515</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/256123"&gt;@JJP1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Actually iam getting these values from mainframe application in the form of text file.whether the mainframe is causing the issue and sending some incorrect data please .&lt;/P&gt;
&lt;P&gt;no data is showing just blank spaces i can see.please help&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You need to show more details to get more help.&amp;nbsp; Are you trying to use a data step to read a text file and convert it into a SAS dataset?&amp;nbsp; Do you already have a SAS dataset?&amp;nbsp; Are you getting errors (or informative notes) in the SAS log. Show in detail what you are doing and how it does not match what you need.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 18:27:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618645#M181515</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-01-20T18:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Blank space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618701#M181530</link>
      <description>&lt;P&gt;I like &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/22588"&gt;@Amir&lt;/a&gt; 's suggestion, as you end up with clean data, rather than filtering on a more complex filter without cleaning.&lt;/P&gt;
&lt;P&gt;You could also replace non-printable characters rather than remove them as &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/22588"&gt;@Amir&lt;/a&gt; does.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WANT;
   set HAVE;
   FLG2 = prxchange('s/\s/ /o',-1,FLG);
   if FLG2 ne '';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Jan 2020 21:10:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618701#M181530</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-01-20T21:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Blank space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618702#M181531</link>
      <description>&lt;P&gt;Or:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WANT;
   set HAVE;
   FLG2 = prxchange('s/[:^print:]/ /o',-1,FLG);
   if FLG2 ne '';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to target more than white spaces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 10:56:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618702#M181531</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-01-21T10:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Blank space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618793#M181568</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/256123"&gt;@JJP1&lt;/a&gt;&amp;nbsp;&lt;FONT color="#000000"&gt;The number you get in the rank column stands for the &lt;A href="http://www.asciitable.com/" target="_blank" rel="noopener"&gt;ASCII code.&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;You'll know your variable contains a non-printable character whenever&amp;nbsp;you get a number &amp;lt;= 31.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;With this you'll be able to specifically aim at a sign you would like to handle.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 08:20:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618793#M181568</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2020-01-21T08:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Blank space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618798#M181572</link>
      <description>&lt;P&gt;Or a number &amp;gt;= 127 &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 08:57:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618798#M181572</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-01-21T08:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Blank space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618816#M181580</link>
      <description>&lt;P&gt;Thanks all for your help.&lt;BR /&gt;Actually for flg column mainframe team is sending the null values in it.so beacuse of this SAS treated null value as value,even thought it do not have actual values.&lt;BR /&gt;i requested them to remove null values and send to SAS.&lt;BR /&gt;now it looks good.thanks&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 10:32:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Blank-space/m-p/618816#M181580</guid>
      <dc:creator>JJP1</dc:creator>
      <dc:date>2020-01-21T10:32:14Z</dc:date>
    </item>
  </channel>
</rss>

