@wheddingsjr wrote:
Good afternoon
I am trying to export an excel file into SAS EG and I keep getting the above mentioned error message. Can anyone assist me? This is the code I am using.
/* claims file name from AM From payer directory */
%LET claimsFile= \\Cifs2\pop_lab$\P4P\BCBSMA\FY20\Actively Managed\From BCBSMA\AMCohorts_01May2019_31Mar2020_medical.xlsx;
%LET claimsFileType= XLSX; /* Options: DLM, XLSX */
%LET claimsSheetname= AMCohorts_01May2019_31Mar2020_m;
LIBNAME EPICPAT odbc complete="driver=SQL Server; database=EPIC; server=PHSSQL2195" schema=PATIENT; /* dev server */
/*Cohort period*/
%let Beg_dt= '01MAY2019'D;
%LET End_dt = '30APR2020'D;
%LET HCPCS = hcpcs_proc_cd IN ('99281',' 99282', '99283', '99284', '99285');
%LET REV = revenue_cd IN ('450','451','452','456','459','981');
proc sql;
create table AMCohort as select
distinct *
from claimsfile.AMCohorts_01May2019_31Mar2020_medical
where &REV
and &HCPCS
;quit;
I do not see any code in that posted that attempts to use the XLSX file in any way.
The way you use
from claimsfile.AMCohorts_01May2019_31Mar2020_medical
is telling SAS to look for that way-too-long name AMCohorts_01May2019_31Mar2020_medical in the library named Claimsfile. Library names are limited to 8 characters, so "Claimsfile" at 10 characters is invalid, the data set names are limited to 32 characters and that at 37 characters is too long.
And if you meant to use the text in that macro variable as a data source you need to do something else to establish a link with the file. A libname statement or task to connect to the file.