<?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: create new variable using input and format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/create-new-variable-using-input-and-format/m-p/922655#M363313</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/448857"&gt;@stataq&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks. So "??" is for cleaner log file? when do we need to use "??" instead?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You don't NEED to use it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might WANT to use it when:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;You know that some of the original values might not be valid for the INFORMAT being used.&lt;/LI&gt;
&lt;LI&gt;You do not need to distinguish between those original values.&amp;nbsp; They will be mapped to missing.&lt;/LI&gt;
&lt;LI&gt;You do not want the SAS log to display the invalid values.&lt;/LI&gt;
&lt;/UL&gt;</description>
    <pubDate>Wed, 03 Apr 2024 02:39:17 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2024-04-03T02:39:17Z</dc:date>
    <item>
      <title>create new variable using input and format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-new-variable-using-input-and-format/m-p/922650#M363310</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a silly question. I saw people use proc format and then build new variable with it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I saw some used&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;Region = put(parkcode, $reglbl.);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;but some used&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Region=put(parkcode, ??&amp;nbsp; reglbl.)&lt;/PRE&gt;
&lt;P&gt;what are the difference. I am very confused on '??' part. Could anyone guide me on this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 01:48:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-new-variable-using-input-and-format/m-p/922650#M363310</guid>
      <dc:creator>stataq</dc:creator>
      <dc:date>2024-04-03T01:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: create new variable using input and format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-new-variable-using-input-and-format/m-p/922652#M363311</link>
      <description>&lt;P&gt;?? can be used with the INPUT function, not the PUT function.&amp;nbsp; Consider these variations:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;n1 = input('ABC', 3.);
n2 = input('ABC', ?? 3.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The first statement would give you a message about invalid data being read since the 3. informat looks to create a numeric value.&amp;nbsp; And "ABC" can't be read as numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a way, the second statement gives the same outcome in that n1 will equal n2.&amp;nbsp; However, the ?? suppresses any messages in the log about invalid data.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 02:06:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-new-variable-using-input-and-format/m-p/922652#M363311</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2024-04-03T02:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: create new variable using input and format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-new-variable-using-input-and-format/m-p/922654#M363312</link>
      <description>&lt;P&gt;Thanks. So "??" is for cleaner log file? when do we need to use "??" instead?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 02:27:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-new-variable-using-input-and-format/m-p/922654#M363312</guid>
      <dc:creator>stataq</dc:creator>
      <dc:date>2024-04-03T02:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: create new variable using input and format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/create-new-variable-using-input-and-format/m-p/922655#M363313</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/448857"&gt;@stataq&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks. So "??" is for cleaner log file? when do we need to use "??" instead?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You don't NEED to use it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might WANT to use it when:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;You know that some of the original values might not be valid for the INFORMAT being used.&lt;/LI&gt;
&lt;LI&gt;You do not need to distinguish between those original values.&amp;nbsp; They will be mapped to missing.&lt;/LI&gt;
&lt;LI&gt;You do not want the SAS log to display the invalid values.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 03 Apr 2024 02:39:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/create-new-variable-using-input-and-format/m-p/922655#M363313</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-04-03T02:39:17Z</dc:date>
    </item>
  </channel>
</rss>

