Hi,
I'm doing a secondary data analysis using a dataset with data collected by someone else.
I made a copy of the data set. I exported the dataset to make correct variables that were in as character and should have been numeric. However, when I import the data set with changes, the changes are not there. I think it might be an issue with my import statement and "replace" not being in blue. Below is my code.
Proc export data = ICPNEED.cg_demo_fix
Outfile = 'C:\Users\gtuck\OneDrive\Documents\Gretchen Dissertation\SAS\Working Data Set\cg_demo_fix.xlsx'
DBMS = XLSX replace;
Sheet = 'cg_demo_fix';
Run;
Proc import datafile = 'C:\Users\gtuck\OneDrive\Documents\Gretchen Dissertation\SAS\Working Data Set\cg_demo_fix.xlsx'
OUT = ICPNEED.cg_demo_fix
DBMS = XLSX Replace;
Sheet = 'cg_demo_fix';
Run;
/*Have to fix cg_edu, iadl_income_1 and iadl_income_2 from character to numeric*/
/*Proc export data = ICPNEED.cg_demo_fix
Outfile = 'C:\Users\gtuck\OneDrive\Documents\Gretchen Dissertation\SAS\Working Data Set\cg_demo_corrected.xlsx'
DBMS = XLSX replace;
Sheet = 'cg_demo_corrected';
Run;