BookmarkSubscribeRSS Feed
kk11
Obsidian | Level 7

Hi,

 

 

I am new to macros and trying to understand setting up of environmental variable.

 

 

I want to impute missing data using the IVEware software.

 

 

My data set has 94 variables and the variables with missing data are,

 

 

Categorical - 


ELECTIVE - binary

PAY1 - 6 categories

RACE - 6 categories

ZIPINC_QRTL - quartile

 

 

 

Continuous - 

TOTCHG
CCR_NIS

 

I am using the following code to run the macro using the SAS callable software IVEware.

 

 

 

libname SAMPLEWORK "C:/Users/Sam/Documents/Sample work";


options set = SRCLIB 'C:/Program Files (x86)/Srclib/sas' sasautos=('!SRCLIB' sasautos) mautosource;


%impute(name=impute, dir='C:/Users/Sam/Documents/Sample work, setup=new);
title SAMPLE Multiple imputation;
datain SAMPLEWORK.SAMPLE;
dataout SAMPLEWORK.SAMPLE_impute;
default categorical;
continuous AGE LOS TOTCHG CCR_NIS TOTAL_DISC readmit_score mortal_score;
mixed DISCWT NIS_STRATUM;
count NCHRONIC NDX NPR N_DISC_U N_HOSP_U S_DISC_U S_HOSP_U;
ABB AGE LOS TOTCHG CCR_NIS TOTAL_DISC readmit_score mortal_score;
transfer YEAR TAVR;
maxpred 15;
minrsqd .1;
iterations 10;
multiples 10;
seed 2001;
run;

 


I got the following error,

 

 

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56 options set = SRCLIB 'C:/Program Files (x86)/Srclib/sas' sasautos=('!SRCLIB'
56 ! sasautos) mautosource;
57
58 %impute(name=impute, dir=C:/Users/kata/NIS Work, setup=new);
WARNING: The argument to macro function %SYSGET is not defined as a system variable.
Can't write setup file.
59 title TAVR Multiple imputation;
60 datain NIS.NIS_TAVR_10_15_CLEAN3;
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.
61 dataout NIS.NIS_TAVR_10_15_impute;
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.
62 default categorical;
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.
63 continuous AGE LOS TOTCHG CCR_NIS TOTAL_DISC readmit_score mortal_score;
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.
64 mixed DISCWT NIS_STRATUM;
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.
65 count NCHRONIC NDX NPR N_DISC_U N_HOSP_U S_DISC_U S_HOSP_U;
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.
66 ABB AGE LOS TOTCHG CCR_NIS TOTAL_DISC readmit_score mortal_score;
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.
67 transfer YEAR TAVR;
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.
68 maxpred 15;
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.
69 minrsqd .1;
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.
70 iterations 10;
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.
71 multiples 10;
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.
72 seed 2001;
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.
73 run;
74
75 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
87

 

Can any one please help me?

 

Thank you,


KK

 

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

As you have not provided the body of the macro %impute there is little we can say.

I would however point out that your code, after the macro call, is invalid SAS code in every line, so unless that macro does something special, none of that code will work even if you fix your macro issue.

It maybe correct for this "SAS callable software IVEware", which I have not heard of, but if so, perhaps a good idea to post on their forum?

kk11
Obsidian | Level 7

Thank you for reply.

 

I am able to figure it out.

 

I didn't type " ' " at the end in dir argument.

 

Thank you.

 

KK

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 692 views
  • 0 likes
  • 2 in conversation