<?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 avoid note while tranposing in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-note-while-tranposing/m-p/744649#M233306</link>
    <description>&lt;P&gt;First, let's examine the problem and why you get a note at all.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
name = 'Princess Diana';
rank = 1;
run;
proc transpose data=have out=want;
   var name rank;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When transposing a set of variables that include both character and numeric, SAS has a problem.&amp;nbsp; The output variable will have to be character in order to hold "Princess Diana".&amp;nbsp; So SAS has to convert the numeric variable RANK from numeric to character to be able to transpose the data.&amp;nbsp; This leads to several questions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;What is the length of the transposed variable?&lt;/LI&gt;
&lt;LI&gt;Where will the "1" appear?&amp;nbsp; Position 1 (left-hand-justified)?&amp;nbsp; Position 8?&amp;nbsp; Position 12?&amp;nbsp; Position 14?&lt;/LI&gt;
&lt;LI&gt;How would SAS handle a more complex situation such as a third variable with a value of 1/3 ?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The basic conclusion is that you don't know what is in your output data set without a vigorous inspection.&amp;nbsp; And if you don't know what is in it, you can't program with it accurately.&amp;nbsp; Thus the note.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to get rid of the note, you have to change your process.&amp;nbsp; Instead of transposing a mix of character and numeric variables, you might use two transposes, one for character variables and one for numeric.&amp;nbsp; Or you might convert all your numeric variables to character before transposing.&amp;nbsp; (How to do this is an often-asked question on this board, but does not have a simple answer.)&amp;nbsp; But just snapping your fingers and removing the note is not an option.&lt;/P&gt;</description>
    <pubDate>Sun, 30 May 2021 13:21:09 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2021-05-30T13:21:09Z</dc:date>
    <item>
      <title>How to avoid note while tranposing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-note-while-tranposing/m-p/744644#M233303</link>
      <description>Hii..Can anyone help me for..&lt;BR /&gt;How Can we avoid below note while tranposing&lt;BR /&gt;&lt;BR /&gt;Note: Numeric variables in the input&lt;BR /&gt;data set will be converted to character in the output data set</description>
      <pubDate>Sun, 30 May 2021 10:31:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-note-while-tranposing/m-p/744644#M233303</guid>
      <dc:creator>sasuser123123</dc:creator>
      <dc:date>2021-05-30T10:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid note while tranposing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-note-while-tranposing/m-p/744649#M233306</link>
      <description>&lt;P&gt;First, let's examine the problem and why you get a note at all.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
name = 'Princess Diana';
rank = 1;
run;
proc transpose data=have out=want;
   var name rank;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When transposing a set of variables that include both character and numeric, SAS has a problem.&amp;nbsp; The output variable will have to be character in order to hold "Princess Diana".&amp;nbsp; So SAS has to convert the numeric variable RANK from numeric to character to be able to transpose the data.&amp;nbsp; This leads to several questions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;What is the length of the transposed variable?&lt;/LI&gt;
&lt;LI&gt;Where will the "1" appear?&amp;nbsp; Position 1 (left-hand-justified)?&amp;nbsp; Position 8?&amp;nbsp; Position 12?&amp;nbsp; Position 14?&lt;/LI&gt;
&lt;LI&gt;How would SAS handle a more complex situation such as a third variable with a value of 1/3 ?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The basic conclusion is that you don't know what is in your output data set without a vigorous inspection.&amp;nbsp; And if you don't know what is in it, you can't program with it accurately.&amp;nbsp; Thus the note.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to get rid of the note, you have to change your process.&amp;nbsp; Instead of transposing a mix of character and numeric variables, you might use two transposes, one for character variables and one for numeric.&amp;nbsp; Or you might convert all your numeric variables to character before transposing.&amp;nbsp; (How to do this is an often-asked question on this board, but does not have a simple answer.)&amp;nbsp; But just snapping your fingers and removing the note is not an option.&lt;/P&gt;</description>
      <pubDate>Sun, 30 May 2021 13:21:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-note-while-tranposing/m-p/744649#M233306</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2021-05-30T13:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid note while tranposing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-note-while-tranposing/m-p/744651#M233308</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/282134"&gt;@sasuser123123&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I completely agree with&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;&amp;nbsp;and I would check whether you get what you really want to get and whether the resulting dataset is the best representation you can think of.&lt;/P&gt;
&lt;P&gt;It's much better to alter your programming logic to avoid such a note instead of just suppressing the note. You can suppress the note as in the small program below, but I am very reluctant to tell you as I don't consider that as good programming practice. Warnings for example cannot be suppressed. And Errors can only sometimes be suppressed (if you get more than X times the same error with a PROC, it can be handy to only show the first 10 or so).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nonotes;
proc transpose data=sashelp.class out=temp;      
 var name age height;                          
run;    
proc print data=temp width=min;                  
run;
/* end of programming */&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Good luck,&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Sun, 30 May 2021 13:33:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-note-while-tranposing/m-p/744651#M233308</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-05-30T13:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to avoid note while tranposing</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-note-while-tranposing/m-p/744653#M233309</link>
      <description>&lt;P&gt;To be complete:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nonotes;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;exists but I would not use it!&lt;/P&gt;
&lt;P&gt;I only use it (very rarely) when a macro does thousands of loops always throwing the same notes. This to avoid the LOG-window running full. And I never suppress the notes for the 1st and last loop.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nowarning;
             ---------
             13
ERROR 13-12: Unrecognized SAS option name NOWARNING.
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thus, options nowarning does not exist!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options ERROR=20;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV class="xis-eDocBody"&gt;
&lt;DIV id="n1nzmsupywf45qn1m6j1eczg1cb4" class="xis-topic"&gt;
&lt;DIV id="p03dijmz85odben1x28svcidu9yo" class="xis-subTopic"&gt;
&lt;DIV id="n1i1a5xarvz7ewn197cfddxstuu2" class="xis-topicContent"&gt;
&lt;DIV id="p0ofzjrpjyr87vn10wxt1dm18ixq" class="xis-paragraph"&gt;
&lt;DIV class="xis-listTermDef"&gt;
&lt;DIV id="p10iil4za618z6n17djacz58oyxl" class="xis-termDefPair"&gt;
&lt;DIV class="xis-term"&gt;ERRORS=&lt;/DIV&gt;
&lt;DIV class="xis-definition"&gt;
&lt;DIV class="xis-paraSimpleFirst"&gt;specifies the maximum number of observations for which SAS issues complete error messages.&lt;/DIV&gt;
&lt;DIV class="xis-paraSimpleFirst"&gt;If you have 500 observations throwing the same error message you might want to limit that to 20.&lt;/DIV&gt;
&lt;DIV class="xis-paraSimpleFirst"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="xis-paraSimpleFirst"&gt;Cheers,&lt;/DIV&gt;
&lt;DIV class="xis-paraSimpleFirst"&gt;Koen&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Sun, 30 May 2021 13:50:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-avoid-note-while-tranposing/m-p/744653#M233309</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2021-05-30T13:50:28Z</dc:date>
    </item>
  </channel>
</rss>

