Hello,
I have error messages shown on the log screen. Please help.
%macro vvv(ooo);
%do ooo=1 %to 10;
%let i=(&rr + 1);
%let rr=%eval(&i);
data eddisdx&ooo;
set ds2ed (keep=studysite scrdate caseid eddisdx&ooo);
if eddisdx&ooo ne ' ';
/*R51 headache ok through FY20*/
/*M358 ok through FY20 revised for FY21 to M3581 (MIS-C) and M3589*/
if eddisdx&ooo in('999.9999','999..999','999.999','U07.1','U07.0','999.99','R51','M358') then delete;
icd_10_cm=upcase(compress(eddisdx&ooo,',.[]-/'));
run;
proc sort data=eddisdx&ooo; by icd_10_cm; run;
data edcr&rr (keep=studysite scrdate caseid eddisdx&ooo icd_10_cm);
merge eddisdx&ooo (in=a) icd_10_cm (in=b);
by icd_10_cm;
if a=1 and b ne 1;
run;
proc sort data=edcr&rr; by studysite caseid; run;
%let edcrf_&rr=%str(Discharge diagnosis [eddisdx&ooo.] does not match ICD-10-CM code list);
ods proclabel "Check &rr:&&edcrf_&rr";
data edcr&rr;
set edcr&rr;
var1='scrdate='||trim(left(put(scrdate,mmddyy10.)))
||', '||"eddisdx&ooo.="||trim(left(put(eddisdx&ooo,$20.)));
||', '||"eddisdx&ooo. without special symbol="||trim(left(put(icd_10_cm,$20.)));
format studysite studysite.;
run;
%createchr;
%end;
%mend vvv;
%vvv;
MPRINT(ARIEDCHART): ;
MPRINT(VVV): data eddisdx1;
MPRINT(VVV): set ds2ed (keep=studysite scrdate caseid eddisdx1);
MPRINT(VVV): if eddisdx1 ne ' ';
MPRINT(VVV): if eddisdx1 in('999.9999','999..999','999.999','U07.1','U07.0','999.99','R51','M358')
then delete;
MPRINT(VVV): icd_10_cm=upcase(compress(eddisdx1,',.[]-/'));
MPRINT(VVV): run;
NOTE: There were 6175 observations read from the data set WORK.DS2ED.
NOTE: The data set WORK.EDDISDX1 has 5852 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
MPRINT(VVV): proc sort data=eddisdx1;
MPRINT(VVV): by icd_10_cm;
MPRINT(VVV): run;
NOTE: There were 5852 observations read from the data set WORK.EDDISDX1.
NOTE: The data set WORK.EDDISDX1 has 5852 observations and 5 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
MPRINT(VVV): data edcr2 (keep=studysite scrdate caseid eddisdx1 icd_10_cm);
MPRINT(VVV): merge eddisdx1 (in=a) icd_10_cm (in=b);
MPRINT(VVV): by icd_10_cm;
MPRINT(VVV): if a=1 and b ne 1;
MPRINT(VVV): run;
NOTE: There were 5852 observations read from the data set WORK.EDDISDX1.
NOTE: There were 73982 observations read from the data set WORK.ICD_10_CM.
NOTE: The data set WORK.EDCR2 has 1 observations and 5 variables.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
MPRINT(VVV): proc sort data=edcr2;
MPRINT(VVV): by studysite caseid;
MPRINT(VVV): run;
NOTE: There were 1 observations read from the data set WORK.EDCR2.
NOTE: The data set WORK.EDCR2 has 1 observations and 5 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
MPRINT(VVV): ods proclabel "Check 2:Discharge diagnosis [eddisdx1] does not match ICD-10-CM code
list";
MPRINT(VVV): data edcr2;
MPRINT(VVV): set edcr2;
180: LINE and COLUMN cannot be determined.
NOTE: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where
the error has occurred.
ERROR 180-322: Statement is not valid or it is used out of proper order.
MPRINT(VVV): var1='scrdate='||trim(left(put(scrdate,mmddyy10.))) ||',
'||"eddisdx1="||trim(left(put(eddisdx1,$20.)));
MPRINT(VVV): ||', '||"eddisdx1 without special symbol="||trim(left(put(icd_10_cm,$20.)));
MPRINT(VVV): format studysite studysite.;
MPRINT(VVV): run;
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.EDCR2 may be incomplete. When this step was stopped there were 0
observations and 6 variables.
WARNING: Data set WORK.EDCR2 was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
MPRINT(CREATECHR): proc print data = edcr2 noobs label;
MPRINT(CREATECHR): by studysite;
MPRINT(CREATECHR): title2 "Check 2:Discharge diagnosis [eddisdx1] does not match ICD-10-CM code
list";
MPRINT(CREATECHR): run;
NOTE: There were 1 observations read from the data set WORK.EDCR2.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
MPRINT(CREATECHR): proc format CNTLOUT=fmt2;
MPRINT(CREATECHR): value ed (default=255) 2="2:Discharge diagnosis [eddisdx1] does not match
ICD-10-CM code list";
NOTE: Format ED is already on the library WORK.FORMATS.
NOTE: Format ED has been output.
MPRINT(CREATECHR): run;
NOTE: PROCEDURE FORMAT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
NOTE: The data set WORK.FMT2 has 15 observations and 21 variables.
MPRINT(CREATECHR): data fmt2_;
MPRINT(CREATECHR): set fmt2;
MPRINT(CREATECHR): if FMTNAME ="ED";
MPRINT(CREATECHR): run;
NOTE: There were 15 observations read from the data set WORK.FMT2.
NOTE: The data set WORK.FMT2_ has 1 observations and 21 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
... View more