<?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 22-322 and ERROR 76-322 - why? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-and-ERROR-76-322-why/m-p/726070#M225604</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am pretty new to SAS and have the following errors I can't seem to understand. Below is my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;libname si "C:\Users\kxfarle\EmoryUE Dropbox\Emory Upper Extremity\TruvenOutputDropbox\TruvenDatabases\CTFiles";
libname md "C:\Users\kxfarle\EmoryUE Dropbox\Emory Upper Extremity\TruvenOutputDropbox\TruvenDatabases\CTFiles\CTDepOutput";
%macro allfiles (allpatients, comorbidities, complications, enrollment, readmit, dataout);
Proc SQL;
	Create Table &amp;amp;DataOut as
	Select Distinct
		a.ENROLID,
		a.PROC1,
		a.rx,
		a.SVCDATE,
		a.AGE,
		a.SEX,
		a.PLANTYP,
		a.REGION,
		a.STDPLAC,
		b.cm_obese,
		b.CM_Renal,
		b.CM_Alc,
		b.cm_HLD,
		b.cm_smoking,
		b.cm_HTN,
		b.cm_CAD,
		b.cm_CHF,
		b.cm_Rheum,
		b.cm_DM,
		b.CM_Depression,
		b.CM_Anxiety,
		b.CM_ADHD,
		b.CM_LBP,
		b.CM_FibroMy,
		c.MI,
		c.Stroke,
        c.Pneumonia,
		c.PneumoniaDays,
        c.Sepsis,
		c.SepsisDays,
		c.DVT_PE,
		c.DVT_PEDays,
		c.Opioid_OD,
		c.Opioid_ODDays,
		c.PostOpPain,
		c.PostOpPainDays,
		c.EDVisit,
		c.EDVisitDays,
		c.EDVisitPain,
		c.EDVisitPainDays,
		c.WoundComplication,
		c.Infection,
        c.IandD,
        c.CRPS,
        c.Med_Nerve_Lesion,
		c.Hypertroph_scar,
		c.Dysesthesia,
		d.Enrollment1y_1y,
		d.Enrollment1y_3y,
		d.Enrollment6M_3M,
		d.Enrollment6m_1y,
		d.Enrollment6m_3y,
		e.readmit90,
		e.readmit30,
	From 
		&amp;amp;allpatients as a
	Left join
		&amp;amp;comorbidities as b
	On 
		a.ENROLID = b.ENROLID
	Left join
		&amp;amp;complications as c
	On
		a.ENROLID = c.ENROLID
	Left join
		&amp;amp;enrollment as d
	on
		a.ENROLID = d.ENROLID
	Left join
		&amp;amp;readmit as e
	on
		a.ENROLID = e.ENROLID;
Quit;
%Mend allfiles;
%allfiles (si.cccombinedv1, md.CCcomorbidities, md.CCcomplications90, si.ccenrollmentok, md.CCreadmit, md.ccallpatients);
%allfiles (si.mdcombinedv1, md.MDcomorbidities, md.MDcomplications90, si.mdenrollmentok, md.MDreadmit, md.mdallpatients);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here's the error I keep getting:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1    libname si "C:\Users\kxfarle\EmoryUE Dropbox\Emory Upper
1  ! Extremity\TruvenOutputDropbox\TruvenDatabases\CTFiles";
NOTE: Libref SI was successfully assigned as follows:
      Engine:        V9
      Physical Name: C:\Users\kxfarle\EmoryUE Dropbox\Emory Upper
      Extremity\TruvenOutputDropbox\TruvenDatabases\CTFiles
2    libname md "C:\Users\kxfarle\EmoryUE Dropbox\Emory Upper
2  ! Extremity\TruvenOutputDropbox\TruvenDatabases\CTFiles\CTDepOutput";
NOTE: Libref MD was successfully assigned as follows:
      Engine:        V9
      Physical Name: C:\Users\kxfarle\EmoryUE Dropbox\Emory Upper
      Extremity\TruvenOutputDropbox\TruvenDatabases\CTFiles\CTDepOutput
3
4    %macro allfiles (allpatients, comorbidities, complications, enrollment, readmit, dataout);
5    Proc SQL;
6        Create Table &amp;amp;DataOut as
7        Select Distinct
8            a.ENROLID,
9            a.PROC1,
10           a.rx,
11           a.SVCDATE,
12           a.AGE,
13           a.SEX,
14           a.PLANTYP,
15           a.REGION,
16           a.STDPLAC,
17           b.cm_obese,
18           b.CM_Renal,
19           b.CM_Alc,
20           b.cm_HLD,
21           b.cm_smoking,
22           b.cm_HTN,
23           b.cm_CAD,
24           b.cm_CHF,
25           b.cm_Rheum,
26           b.cm_DM,
27           b.CM_Depression,
28           b.CM_Anxiety,
29           b.CM_ADHD,
30           b.CM_LBP,
31           b.CM_FibroMy,
32           c.MI,
33           c.Stroke,
34           c.Pneumonia,
35           c.PneumoniaDays,
36           c.Sepsis,
37           c.SepsisDays,
38           c.DVT_PE,
39           c.DVT_PEDays,
40           c.Opioid_OD,
41           c.Opioid_ODDays,
42           c.PostOpPain,
43           c.PostOpPainDays,
44           c.EDVisit,
45           c.EDVisitDays,
46           c.EDVisitPain,
47           c.EDVisitPainDays,
48           c.WoundComplication,
49           c.Infection,
50           c.IandD,
51           c.CRPS,
52           c.Med_Nerve_Lesion,
53           c.Hypertroph_scar,
54           c.Dysesthesia,
55           d.Enrollment1y_1y,
56           d.Enrollment1y_3y,
57           d.Enrollment6M_3M,
58           d.Enrollment6m_1y,
59           d.Enrollment6m_3y,
60           e.readmit90,
61           e.readmit30,
62       From
63           &amp;amp;allpatients as a
64       Left join
65           &amp;amp;comorbidities as b
66       On
67           a.ENROLID = b.ENROLID
68       Left join
69           &amp;amp;complications as c
70       On
71           a.ENROLID = c.ENROLID
72       Left join
73           &amp;amp;enrollment as d
74       on
75           a.ENROLID = d.ENROLID
76       Left join
77           &amp;amp;readmit as e
78       on
79           a.ENROLID = e.ENROLID;
80   Quit;
81   %Mend allfiles;
82   %allfiles (si.cccombinedv1, md.CCcomorbidities, md.CCcomplications90, si.ccenrollmentok,
82 ! md.CCreadmit, md.ccallpatients);
NOTE: Line generated by the macro variable "ALLPATIENTS".
1             si.cccombinedv1
              --
              1
                -
                22
                76
WARNING 1-322: Assuming the symbol IS was misspelled as si.

ERROR 22-322: Syntax error, expecting one of the following: MISSING, NOT, NULL, ^, ~.

ERROR 76-322: Syntax error, statement will be ignored.

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

83   %allfiles (si.mdcombinedv1, md.MDcomorbidities, md.MDcomplications90, si.mdenrollmentok,
83 ! md.MDreadmit, md.mdallpatients);


NOTE: Line generated by the macro variable "ALLPATIENTS".
1             si.mdcombinedv1
              --
              1
                -
                22
                76
WARNING 1-322: Assuming the symbol IS was misspelled as si.

ERROR 22-322: Syntax error, expecting one of the following: MISSING, NOT, NULL, ^, ~.

ERROR 76-322: Syntax error, statement will be ignored.

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Can anyone help me, please?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 14 Mar 2021 04:13:12 GMT</pubDate>
    <dc:creator>johnthurtjr</dc:creator>
    <dc:date>2021-03-14T04:13:12Z</dc:date>
    <item>
      <title>ERROR 22-322 and ERROR 76-322 - why?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-and-ERROR-76-322-why/m-p/726070#M225604</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am pretty new to SAS and have the following errors I can't seem to understand. Below is my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;libname si "C:\Users\kxfarle\EmoryUE Dropbox\Emory Upper Extremity\TruvenOutputDropbox\TruvenDatabases\CTFiles";
libname md "C:\Users\kxfarle\EmoryUE Dropbox\Emory Upper Extremity\TruvenOutputDropbox\TruvenDatabases\CTFiles\CTDepOutput";
%macro allfiles (allpatients, comorbidities, complications, enrollment, readmit, dataout);
Proc SQL;
	Create Table &amp;amp;DataOut as
	Select Distinct
		a.ENROLID,
		a.PROC1,
		a.rx,
		a.SVCDATE,
		a.AGE,
		a.SEX,
		a.PLANTYP,
		a.REGION,
		a.STDPLAC,
		b.cm_obese,
		b.CM_Renal,
		b.CM_Alc,
		b.cm_HLD,
		b.cm_smoking,
		b.cm_HTN,
		b.cm_CAD,
		b.cm_CHF,
		b.cm_Rheum,
		b.cm_DM,
		b.CM_Depression,
		b.CM_Anxiety,
		b.CM_ADHD,
		b.CM_LBP,
		b.CM_FibroMy,
		c.MI,
		c.Stroke,
        c.Pneumonia,
		c.PneumoniaDays,
        c.Sepsis,
		c.SepsisDays,
		c.DVT_PE,
		c.DVT_PEDays,
		c.Opioid_OD,
		c.Opioid_ODDays,
		c.PostOpPain,
		c.PostOpPainDays,
		c.EDVisit,
		c.EDVisitDays,
		c.EDVisitPain,
		c.EDVisitPainDays,
		c.WoundComplication,
		c.Infection,
        c.IandD,
        c.CRPS,
        c.Med_Nerve_Lesion,
		c.Hypertroph_scar,
		c.Dysesthesia,
		d.Enrollment1y_1y,
		d.Enrollment1y_3y,
		d.Enrollment6M_3M,
		d.Enrollment6m_1y,
		d.Enrollment6m_3y,
		e.readmit90,
		e.readmit30,
	From 
		&amp;amp;allpatients as a
	Left join
		&amp;amp;comorbidities as b
	On 
		a.ENROLID = b.ENROLID
	Left join
		&amp;amp;complications as c
	On
		a.ENROLID = c.ENROLID
	Left join
		&amp;amp;enrollment as d
	on
		a.ENROLID = d.ENROLID
	Left join
		&amp;amp;readmit as e
	on
		a.ENROLID = e.ENROLID;
Quit;
%Mend allfiles;
%allfiles (si.cccombinedv1, md.CCcomorbidities, md.CCcomplications90, si.ccenrollmentok, md.CCreadmit, md.ccallpatients);
%allfiles (si.mdcombinedv1, md.MDcomorbidities, md.MDcomplications90, si.mdenrollmentok, md.MDreadmit, md.mdallpatients);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here's the error I keep getting:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1    libname si "C:\Users\kxfarle\EmoryUE Dropbox\Emory Upper
1  ! Extremity\TruvenOutputDropbox\TruvenDatabases\CTFiles";
NOTE: Libref SI was successfully assigned as follows:
      Engine:        V9
      Physical Name: C:\Users\kxfarle\EmoryUE Dropbox\Emory Upper
      Extremity\TruvenOutputDropbox\TruvenDatabases\CTFiles
2    libname md "C:\Users\kxfarle\EmoryUE Dropbox\Emory Upper
2  ! Extremity\TruvenOutputDropbox\TruvenDatabases\CTFiles\CTDepOutput";
NOTE: Libref MD was successfully assigned as follows:
      Engine:        V9
      Physical Name: C:\Users\kxfarle\EmoryUE Dropbox\Emory Upper
      Extremity\TruvenOutputDropbox\TruvenDatabases\CTFiles\CTDepOutput
3
4    %macro allfiles (allpatients, comorbidities, complications, enrollment, readmit, dataout);
5    Proc SQL;
6        Create Table &amp;amp;DataOut as
7        Select Distinct
8            a.ENROLID,
9            a.PROC1,
10           a.rx,
11           a.SVCDATE,
12           a.AGE,
13           a.SEX,
14           a.PLANTYP,
15           a.REGION,
16           a.STDPLAC,
17           b.cm_obese,
18           b.CM_Renal,
19           b.CM_Alc,
20           b.cm_HLD,
21           b.cm_smoking,
22           b.cm_HTN,
23           b.cm_CAD,
24           b.cm_CHF,
25           b.cm_Rheum,
26           b.cm_DM,
27           b.CM_Depression,
28           b.CM_Anxiety,
29           b.CM_ADHD,
30           b.CM_LBP,
31           b.CM_FibroMy,
32           c.MI,
33           c.Stroke,
34           c.Pneumonia,
35           c.PneumoniaDays,
36           c.Sepsis,
37           c.SepsisDays,
38           c.DVT_PE,
39           c.DVT_PEDays,
40           c.Opioid_OD,
41           c.Opioid_ODDays,
42           c.PostOpPain,
43           c.PostOpPainDays,
44           c.EDVisit,
45           c.EDVisitDays,
46           c.EDVisitPain,
47           c.EDVisitPainDays,
48           c.WoundComplication,
49           c.Infection,
50           c.IandD,
51           c.CRPS,
52           c.Med_Nerve_Lesion,
53           c.Hypertroph_scar,
54           c.Dysesthesia,
55           d.Enrollment1y_1y,
56           d.Enrollment1y_3y,
57           d.Enrollment6M_3M,
58           d.Enrollment6m_1y,
59           d.Enrollment6m_3y,
60           e.readmit90,
61           e.readmit30,
62       From
63           &amp;amp;allpatients as a
64       Left join
65           &amp;amp;comorbidities as b
66       On
67           a.ENROLID = b.ENROLID
68       Left join
69           &amp;amp;complications as c
70       On
71           a.ENROLID = c.ENROLID
72       Left join
73           &amp;amp;enrollment as d
74       on
75           a.ENROLID = d.ENROLID
76       Left join
77           &amp;amp;readmit as e
78       on
79           a.ENROLID = e.ENROLID;
80   Quit;
81   %Mend allfiles;
82   %allfiles (si.cccombinedv1, md.CCcomorbidities, md.CCcomplications90, si.ccenrollmentok,
82 ! md.CCreadmit, md.ccallpatients);
NOTE: Line generated by the macro variable "ALLPATIENTS".
1             si.cccombinedv1
              --
              1
                -
                22
                76
WARNING 1-322: Assuming the symbol IS was misspelled as si.

ERROR 22-322: Syntax error, expecting one of the following: MISSING, NOT, NULL, ^, ~.

ERROR 76-322: Syntax error, statement will be ignored.

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

83   %allfiles (si.mdcombinedv1, md.MDcomorbidities, md.MDcomplications90, si.mdenrollmentok,
83 ! md.MDreadmit, md.mdallpatients);


NOTE: Line generated by the macro variable "ALLPATIENTS".
1             si.mdcombinedv1
              --
              1
                -
                22
                76
WARNING 1-322: Assuming the symbol IS was misspelled as si.

ERROR 22-322: Syntax error, expecting one of the following: MISSING, NOT, NULL, ^, ~.

ERROR 76-322: Syntax error, statement will be ignored.

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Can anyone help me, please?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Mar 2021 04:13:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-and-ERROR-76-322-why/m-p/726070#M225604</guid>
      <dc:creator>johnthurtjr</dc:creator>
      <dc:date>2021-03-14T04:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322 and ERROR 76-322 - why?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-and-ERROR-76-322-why/m-p/726073#M225606</link>
      <description>&lt;P&gt;Rule #1 of macro development: start with&amp;nbsp;&lt;EM&gt;working&lt;/EM&gt; non-macro code.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	e.readmit30, /* remove this comma */
From 
	&amp;amp;allpatients as a&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 14 Mar 2021 05:49:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-and-ERROR-76-322-why/m-p/726073#M225606</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-03-14T05:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR 22-322 and ERROR 76-322 - why?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-and-ERROR-76-322-why/m-p/726078#M225611</link>
      <description>&lt;P&gt;Thank you! This was the exact solution.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Mar 2021 06:11:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-22-322-and-ERROR-76-322-why/m-p/726078#M225611</guid>
      <dc:creator>johnthurtjr</dc:creator>
      <dc:date>2021-03-14T06:11:37Z</dc:date>
    </item>
  </channel>
</rss>

