<?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: Ignoring ID statement of PROC TRANSPOSE in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Ignoring-ID-statement-of-PROC-TRANSPOSE/m-p/124407#M25462</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could add a parameter check to your macro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if id="" then do nothing&lt;/P&gt;&lt;P&gt;else create a new macro variable id2 -&amp;gt;id=&amp;amp;id&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Oct 2013 21:21:49 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2013-10-25T21:21:49Z</dc:date>
    <item>
      <title>Ignoring ID statement of PROC TRANSPOSE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Ignoring-ID-statement-of-PROC-TRANSPOSE/m-p/124406#M25461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using proc transpose in a macro (part of it below); and I have ID statement included; but sometimes I don't want to pass the macro variable &amp;amp;ID to the macro; if I don't pass the argument for ID, SAS will give error. However, SAS will not give an error when the &amp;amp;Where for WHERE statement is not specified in the macro... Is there a way to tell SAS not to err when a column for ID statement is not specified in macro parameters?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the error msg given by SAS for not specifying a column name for the ID statement is&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;LINE and COLUMN cannot be determined.&lt;/P&gt;&lt;P&gt;NOTE 242-205: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where the error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; has occurred.&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, _ALL_, _CHARACTER_, _CHAR_, _NUMERIC_.&lt;/P&gt;&lt;P&gt;ERROR: Variable NAME not found.&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro WideTranspose (data=, out= ,by=, id=,where= ,list=, Prefixlist=);&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; %sort( &amp;amp;data, &amp;amp;BY);&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; proc transpose data=&amp;amp;data out=out&amp;amp;n (drop= _:) prefix=&amp;amp;prefix LET;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; by &amp;amp;by;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; var &amp;amp;list;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; id &amp;amp;id;&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&amp;nbsp; where &amp;amp;where;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%WideTranspose (data=data, &lt;/P&gt;&lt;P&gt;&amp;nbsp; out=out ,&lt;/P&gt;&lt;P&gt;&amp;nbsp; by=var1 var2, &lt;/P&gt;&lt;P&gt;&amp;nbsp; id= ,&lt;/P&gt;&lt;P&gt;&amp;nbsp; where= ,&lt;/P&gt;&lt;P&gt;&amp;nbsp; list=var3 var4, &lt;/P&gt;&lt;P&gt;&amp;nbsp; Prefixlist=var3pre var4pre);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 21:19:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Ignoring-ID-statement-of-PROC-TRANSPOSE/m-p/124406#M25461</guid>
      <dc:creator>Altal</dc:creator>
      <dc:date>2013-10-25T21:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: Ignoring ID statement of PROC TRANSPOSE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Ignoring-ID-statement-of-PROC-TRANSPOSE/m-p/124407#M25462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could add a parameter check to your macro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if id="" then do nothing&lt;/P&gt;&lt;P&gt;else create a new macro variable id2 -&amp;gt;id=&amp;amp;id&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 21:21:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Ignoring-ID-statement-of-PROC-TRANSPOSE/m-p/124407#M25462</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-10-25T21:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Ignoring ID statement of PROC TRANSPOSE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Ignoring-ID-statement-of-PROC-TRANSPOSE/m-p/124408#M25463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use macro logic to test if the user requested ID (or BY) processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%macro WideTranspose (data=, out= ,by=, id=,where= ,list=, Prefixlist=);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; %sort( &amp;amp;data, &amp;amp;BY);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; proc transpose data=&amp;amp;data out=out&amp;amp;n (drop= _:) prefix=&amp;amp;prefix LET;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%if %length(&amp;amp;by) %then %do;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; by &amp;amp;by;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%if %length(&amp;amp;list) %then %do;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; var &amp;amp;list;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%if %length(&amp;amp;id) %then %do;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; id &amp;amp;id;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; where &amp;amp;where;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%mend;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 22:09:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Ignoring-ID-statement-of-PROC-TRANSPOSE/m-p/124408#M25463</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-10-25T22:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Ignoring ID statement of PROC TRANSPOSE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Ignoring-ID-statement-of-PROC-TRANSPOSE/m-p/124409#M25464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you guys!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 22:30:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Ignoring-ID-statement-of-PROC-TRANSPOSE/m-p/124409#M25464</guid>
      <dc:creator>Altal</dc:creator>
      <dc:date>2013-10-25T22:30:20Z</dc:date>
    </item>
  </channel>
</rss>

