* PROGRAM: CIMPORT.SAS;
* DESCRIPTION: IMPORT THE INPUT FILES TO THE OOPC PROCESS;

%LET DATALOC = %STR(c:\oopc\input);

OPTIONS MPRINT;

%MACRO IMPTFILE(DL,FN,DSNAME);

  LIBNAME OUTPUT "&DL.";

  FILENAME INF  "&FN.";

  PROC CIMPORT LIBRARY = OUTPUT FILE = INF;
    SELECT &DSNAME;
   RUN;
%MEND;

%IMPTFILE(&DATALOC.,&DATALOC.\PERSON.XPT,PERSON);
RUN;

%IMPTFILE(&DATALOC.,&DATALOC.\UTILIZATION.XPT,UTILIZATION);
RUN;

%IMPTFILE(&DATALOC.,&DATALOC.\DRUGLIST_RXCUI.XPT,DRUGLIST_RXCUI);
RUN;

%IMPTFILE(&DATALOC.,&DATALOC.\BENE_SCRIPT.XPT,BENE_SCRIPT);
RUN;

%IMPTFILE(&DATALOC.,&DATALOC.\CATEGORY.XPT,CATEGORY);
RUN;

%IMPTFILE(&DATALOC.,&DATALOC.\FORMATS.XPT,FORMATS);
RUN;


