<?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 display missing value as character in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-display-missing-value-as-character/m-p/896121#M354062</link>
    <description>&lt;P&gt;hi, Tom the sas dataset show NA, ut when i export to excel. the result is not show. don't know what happened.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Sep 2023 18:06:45 GMT</pubDate>
    <dc:creator>magicdj</dc:creator>
    <dc:date>2023-09-27T18:06:45Z</dc:date>
    <item>
      <title>how to display missing value as character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-display-missing-value-as-character/m-p/896102#M354050</link>
      <description>&lt;P&gt;i set up some missing value as below.&amp;nbsp; in my excel output, i want the non missing numbers still the numbers, but for missing values , i want it show as NA. is there any way to do it? thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data Have;&lt;BR /&gt;Set sashelp.class;&lt;BR /&gt;if age=11 then age=.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc export data=Have&lt;BR /&gt;outfile="/usr/local/SAS/SASUsers/LabRet.excel"&lt;BR /&gt;dbms=tab&lt;BR /&gt;label&lt;BR /&gt;replace;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 17:25:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-display-missing-value-as-character/m-p/896102#M354050</guid>
      <dc:creator>magicdj</dc:creator>
      <dc:date>2023-09-27T17:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to display missing value as character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-display-missing-value-as-character/m-p/896104#M354052</link>
      <description>&lt;P&gt;Why? What extra information does that add?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could define a format that does that.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
  value na . = 'NA' other=[best12.];
run;

data test;
  set sashelp.class(obs=1);
  do age=age,.,._,.A,.Z ;
    output;
  end;
run;

proc print data=test;
  format age na.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result&lt;/P&gt;
&lt;PRE&gt;Obs     Name     Sex        Age         Height    Weight

 1     Alfred     M               14      69       112.5
 2     Alfred     M     NA                69       112.5
 3     Alfred     M                _      69       112.5
 4     Alfred     M                A      69       112.5
 5     Alfred     M                Z      69       112.5
&lt;/PRE&gt;
&lt;P&gt;If you want the other 27 missing values to also print as NA then define the format like this instead:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;value na ._-.Z = 'NA' other=[best12.];&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;value na low-high=[best12.] other='NA';&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Sep 2023 17:35:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-display-missing-value-as-character/m-p/896104#M354052</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-09-27T17:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to display missing value as character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-display-missing-value-as-character/m-p/896121#M354062</link>
      <description>&lt;P&gt;hi, Tom the sas dataset show NA, ut when i export to excel. the result is not show. don't know what happened.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 18:06:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-display-missing-value-as-character/m-p/896121#M354062</guid>
      <dc:creator>magicdj</dc:creator>
      <dc:date>2023-09-27T18:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to display missing value as character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-display-missing-value-as-character/m-p/896138#M354067</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;found the answer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/How-to-retain-the-Variable-Format-when-PROC-EXPORT-TO-EXCEL/td-p/357108" target="_blank"&gt;Solved: How to retain the Variable Format when PROC EXPORT TO EXCEL - SAS Support Communities&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 19:04:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-display-missing-value-as-character/m-p/896138#M354067</guid>
      <dc:creator>magicdj</dc:creator>
      <dc:date>2023-09-27T19:04:38Z</dc:date>
    </item>
  </channel>
</rss>

