<?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 ERROR 180-322: Statement is not valid or it is used out of proper order. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/771793#M244971</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i am running this code this is showing an error into the log ,so what wrong I am doing there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro attrib(domain=);&lt;BR /&gt;%if &amp;amp;domain = DM %then %do;&lt;BR /&gt;attrib&lt;BR /&gt;STUDYID length = $15 label = "Study Identifier"&lt;BR /&gt;DOMAIN length = $2 label = "Domain Abbreviation"&lt;BR /&gt;USUBJID length = $25 label = "Unique Subject Identifier"&lt;BR /&gt;SUBJID length = $7 label = "Subject Identifier for the Study"&lt;BR /&gt;RFSTDTC length = $10 label = "Subject Reference Start Date"&lt;BR /&gt;RFENDTC length = $10 label = "Subject Reference End Date/Time"&lt;BR /&gt;RFXSTDTC length = $10 label = "Date/Time of First Study Treatment"&lt;BR /&gt;RFXENDTC length = $10 label = "Date/Time of Last Study Treatment"&lt;BR /&gt;RFICDTC length = $10 label = "Date/Time of Informed Consent"&lt;BR /&gt;RFPENDTC length = $10 label = "Date/Time of End of Participation"&lt;BR /&gt;DTHDTC length = $10 label = "Date/Time of Death"&lt;BR /&gt;DTHFL length = $2 label = "Subject Death Flag"&lt;BR /&gt;SITEID length = $7 label = "Study Site Identifier"&lt;BR /&gt;BRTHDTC length = $10 label = " Date/Time of Birth"&lt;BR /&gt;AGE length = $8. label = "Age"&lt;BR /&gt;AGEU length = $5 label = "Age Units"&lt;BR /&gt;SEX length = $2 label = "Sex"&lt;BR /&gt;RACE length = $40 label = "Race"&lt;BR /&gt;ARMCD length = $8 label = "Planned Arm Code"&lt;BR /&gt;ARM length = $40 label = "Description of Planned Arm"&lt;BR /&gt;ACTARMCD length = $8 label = "Actual Arm Code"&lt;BR /&gt;ACTARM length = $40 label = "Description of Actual Arm Code"&lt;BR /&gt;COUNTRY length = $3 label = "Country";&lt;BR /&gt;%end;&lt;BR /&gt;%mend;&lt;BR /&gt;%attrib(domain=DM);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/**************************************************/&lt;/P&gt;&lt;P&gt;This is the error -&lt;/P&gt;&lt;DIV class="sasSource"&gt;69 %attrib(domain=DM);&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Line generated by the invoked macro "ATTRIB".&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;69 attrib STUDYID length = $15 label = "Study Identifier" DOMAIN length = $2 label = "Domain Abbreviation" USUBJID length = $25 label = "Unique Subject Identifier" SUBJID length = $17 label = "Subject Identifier for the Study" RFSTDTC length =&lt;/DIV&gt;&lt;DIV class="sasError"&gt;______&lt;/DIV&gt;&lt;DIV class="sasError"&gt;180&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;69 ! $10 label =&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/DIV&gt;</description>
    <pubDate>Sat, 02 Oct 2021 22:49:04 GMT</pubDate>
    <dc:creator>u52766097</dc:creator>
    <dc:date>2021-10-02T22:49:04Z</dc:date>
    <item>
      <title>ERROR 180-322: Statement is not valid or it is used out of proper order.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/771793#M244971</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i am running this code this is showing an error into the log ,so what wrong I am doing there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro attrib(domain=);&lt;BR /&gt;%if &amp;amp;domain = DM %then %do;&lt;BR /&gt;attrib&lt;BR /&gt;STUDYID length = $15 label = "Study Identifier"&lt;BR /&gt;DOMAIN length = $2 label = "Domain Abbreviation"&lt;BR /&gt;USUBJID length = $25 label = "Unique Subject Identifier"&lt;BR /&gt;SUBJID length = $7 label = "Subject Identifier for the Study"&lt;BR /&gt;RFSTDTC length = $10 label = "Subject Reference Start Date"&lt;BR /&gt;RFENDTC length = $10 label = "Subject Reference End Date/Time"&lt;BR /&gt;RFXSTDTC length = $10 label = "Date/Time of First Study Treatment"&lt;BR /&gt;RFXENDTC length = $10 label = "Date/Time of Last Study Treatment"&lt;BR /&gt;RFICDTC length = $10 label = "Date/Time of Informed Consent"&lt;BR /&gt;RFPENDTC length = $10 label = "Date/Time of End of Participation"&lt;BR /&gt;DTHDTC length = $10 label = "Date/Time of Death"&lt;BR /&gt;DTHFL length = $2 label = "Subject Death Flag"&lt;BR /&gt;SITEID length = $7 label = "Study Site Identifier"&lt;BR /&gt;BRTHDTC length = $10 label = " Date/Time of Birth"&lt;BR /&gt;AGE length = $8. label = "Age"&lt;BR /&gt;AGEU length = $5 label = "Age Units"&lt;BR /&gt;SEX length = $2 label = "Sex"&lt;BR /&gt;RACE length = $40 label = "Race"&lt;BR /&gt;ARMCD length = $8 label = "Planned Arm Code"&lt;BR /&gt;ARM length = $40 label = "Description of Planned Arm"&lt;BR /&gt;ACTARMCD length = $8 label = "Actual Arm Code"&lt;BR /&gt;ACTARM length = $40 label = "Description of Actual Arm Code"&lt;BR /&gt;COUNTRY length = $3 label = "Country";&lt;BR /&gt;%end;&lt;BR /&gt;%mend;&lt;BR /&gt;%attrib(domain=DM);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/**************************************************/&lt;/P&gt;&lt;P&gt;This is the error -&lt;/P&gt;&lt;DIV class="sasSource"&gt;69 %attrib(domain=DM);&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;NOTE: Line generated by the invoked macro "ATTRIB".&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;69 attrib STUDYID length = $15 label = "Study Identifier" DOMAIN length = $2 label = "Domain Abbreviation" USUBJID length = $25 label = "Unique Subject Identifier" SUBJID length = $17 label = "Subject Identifier for the Study" RFSTDTC length =&lt;/DIV&gt;&lt;DIV class="sasError"&gt;______&lt;/DIV&gt;&lt;DIV class="sasError"&gt;180&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;69 ! $10 label =&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/DIV&gt;</description>
      <pubDate>Sat, 02 Oct 2021 22:49:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/771793#M244971</guid>
      <dc:creator>u52766097</dc:creator>
      <dc:date>2021-10-02T22:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 180-322: Statement is not valid or it is used out of proper order.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/771795#M244973</link>
      <description>&lt;P&gt;You cannot run an ATTRIB statement in the middle of nowhere.&amp;nbsp; It has to be part of a DATA step.&lt;/P&gt;
&lt;P&gt;What dataset are you trying to create?&amp;nbsp; Let's say you want to make a dataset named WANT.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  %attrib(domain=DM);
  stop;
  call missing(of _all_);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Oct 2021 23:26:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/m-p/771795#M244973</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-10-02T23:26:17Z</dc:date>
    </item>
  </channel>
</rss>

