It is a type of file extension. This code worked but im trying learn to use macros
LIBNAME MEPS 'C:\Users\HP SPECTRE\Documents\meps directory';
FILENAME H163 'C:\Users\HP SPECTRE\Documents\meps directory\consolidated\H163.SSP';
PROC XCOPY IN = H163 OUT = MEPS IMPORT;
RUN;
these are the complete logs for the macros i used
/**for first code**/ %macro import(meps);
39
40 FILENAME HI63 'C:\Users\HP SPECTRE\Documents\meps directory\consolidated\H163.SSP';
41
42 PROC IMPORT DATAFILE=HI63 DBMS=SSP OUT=&MEPS. REPLACE;
43 GETNAMES=YES;
44 RUN;
45 %mend import;
46
47 %import (H171);
ERROR: DBMS type SSP not valid for import.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
48 %import (H181);
ERROR: DBMS type SSP not valid for import.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
49
50 run;
/** second log for the second code**/
%let meps_file = h163;
3 %let meps_url = https://meps.ahrq.gov/mepsweb/data_files/pufs/h163ssp.zip;
4 %let meps_dir = C:\Users\HP SPECTRE\Documents\meps directory;
5
6
7 /* DO NOT EDIT this section *******************************/
8 /* Download zip file from MEPS website to specified directory (meps_dir) */
9 filename zipfile "&meps_dir/&meps_file.v9.zip";
10
11 proc http
12 url = "&meps_url"
13 out = zipfile;
14 run;
NOTE: 200 OK
NOTE: PROCEDURE HTTP used (Total process time):
real time 1.68 seconds
cpu time 0.23 seconds
15
16 /* Unzip SAS dataset and save in specified directory */
17 filename inzip ZIP "&meps_dir/&meps_file.v9.zip";
18 filename sasfile "&meps_dir/&meps_file..sas7bdat" ;
19
20 data _null_;
21 infile inzip(&meps_file..sas7bdat)
22 lrecl=256 recfm=F length=length eof=eof unbuf;
23 file sasfile lrecl=256 recfm=N;
24 input;
25 put _infile_ $varying256. length;
26 return;
27 eof:
28 stop;
29 run;
ERROR: Entry h155.sas7bdat in zip file C:\Users\HP SPECTRE\Documents\meps directory\h155v9.zip does not exist.
ERROR: Physical file does not exist, h155.sas7bdat.
NOTE: UNBUFFERED is the default with RECFM=N.
NOTE: The file SASFILE is:
Filename=C:\Users\HP SPECTRE\Documents\meps directory\h155.sas7bdat,
RECFM=N,LRECL=256,File Size (bytes)=0,
Last Modified=17Nov2021:15:39:25,
Create Time=17Nov2021:15:39:25
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.04 seconds
cpu time 0.00 seconds
30 LIBNAME MEPS 'C:\Users\HP SPECTRE\Documents\meps directory';
NOTE: Libref MEPS was successfully assigned as follows:
Engine: V9
Physical Name: C:\Users\HP SPECTRE\Documents\meps directory
31 FILENAME H163 'C:\Users\HP SPECTRE\Documents\meps directory\consolidated';
32 PROC XCOPY IN = H163 OUT = MEPS IMPORT;
NOTE: Writing HTML Body file: sashtml.htm
33 RUN;
NOTE: Input library H163 is sequential.
ERROR: Invalid file, C:\Users\HP SPECTRE\Documents\meps directory\consolidated.
NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE XCOPY used (Total process time):
real time 0.53 seconds
cpu time 0.32 seconds
NOTE: The SAS System stopped processing this step because of errors.
... View more