I am using a dataset from PRAMS. I imported the file which has several different tabs for different variables. Under each tab, there are different survey questions in each individauls from each state replied. Since they are on the same tab however, SAS is creating one giant table that includes each survey question for each variable. This is causing there to be up to 800 obs. I am also wondering how I can code this so that I have a select few states from the set instead of all of them. Below you will find my code. I clearly am new to this, so any advice would be appreciated. Thanks! libname Prams 'D:\PhotonUser\My Files\Home Folder\Prams'; run; /* import substance use sheet */ PROC IMPORT FILE="D:\PhotonUser\My Files\Home Folder\Prams\Prams20.xlsx" OUT=Prams20_Substance_Use DBMS=xlsx REPLACE; SHEET="Substance Use"; run; /* import health ins. status prenatal sheet */ PROC IMPORT FILE="D:\PhotonUser\My Files\Home Folder\Prams\Prams20.xlsx" OUT=Prams20_Health_Ins_Prenatal DBMS=xlsx REPLACE; SHEET="Health Ins. Status Prenatal"; run; /* import health ins. status postpartum sheet */ PROC IMPORT FILE="D:\PhotonUser\My Files\Home Folder\Prams\Prams20.xlsx" OUT=Prams20_Health_Ins_Postpartum DBMS=xlsx REPLACE; SHEET="Health Ins. Status Postpartum"; run; /* import depression sheet */ PROC IMPORT FILE="D:\PhotonUser\My Files\Home Folder\Prams\Prams20.xlsx" OUT=Prams20_Health_Depression DBMS=xlsx REPLACE; SHEET="Depression"; run; /* import pregnancy intention sheet */ PROC IMPORT FILE="D:\PhotonUser\My Files\Home Folder\Prams\Prams20.xlsx" OUT=Prams20_Preg_Intent DBMS=xlsx REPLACE; SHEET="Pregnancy Intention"; run; /* import health care services sheet */ PROC IMPORT FILE="D:\PhotonUser\My Files\Home Folder\Prams\Prams20.xlsx" OUT=Prams20_Health_Srv DBMS=xlsx REPLACE; SHEET="Health Care Services"; run; /* import intimate partner violence sheet */ PROC IMPORT FILE="D:\PhotonUser\My Files\Home Folder\Prams\Prams20.xlsx" OUT=Prams20_IPV DBMS=xlsx REPLACE; SHEET="Intimate Partner Violence (IPV)"; run;
... View more