BookmarkSubscribeRSS Feed
Syed_Najeeb
Calcite | Level 5

I have created this library file to run the CMS HCC V24. I am getting a set of errors in which I need help to resolve.

This is the library file


LIBNAME LIBRARY "/home/u63616417/sasuser.v94/v24_y2022/";
** "location of formats";
FILENAME IN0 "/home/u63616417/sasuser.v94/v24_y2022/";

**"location of macros";
LIBNAME IN1 "/home/u63616417/sasuser.v94/v24_y2022/";
**"location of person-level file";
LIBNAME IN2 "/home/u63616417/sasuser.v94/v24_y2022/in/";
**"location of diagnosis file";
LIBNAME INCOEF "/home/u63616417/sasuser.v94/v24_y2022/in/";
**"location of the coefficients file";
LIBNAME OUT "/home/u63616417/sasuser.v94/v24_y2022/out/";
**"location for the output file";
filename inc "/home/u63616417/sasuser.v94/v24_y2022/C2419P1M";
libname incoef "/home/u63616417/sasuser.v94/v24_y2022/";
proc cimport data=incoef.hcccoefn infile=inc;
run;

%INCLUDE "/home/u63616417/sasuser.v94/v24_y2022/AGESEXV2.SAS";
%INCLUDE "/home/u63616417/sasuser.v94/v24_y2022/SCOREVAR.SAS";
%INCLUDE "/home/u63616417/sasuser.v94/v24_y2022/V24H86H1.SAS";
%INCLUDE "/home/u63616417/sasuser.v94/v24_y2022/V24H86L1.SAS";
%INCLUDE "/home/u63616417/sasuser.v94/v24_y2022/V24I0ED2.SAS";


filename inf "/home/u63616417/sasuser.v94/v24_y2022/F2422P1M";
libname library "/home/u63616417/sasuser.v94/v24_y2022/";
proc cimport library=library infile=inf;
run;

 

%let filepath = /home/u63616417/sasuser.v94/v24_y2022/AGESEXV2.sas;
%let fileref = myref;

filename &fileref "&filepath";

data _null_;
if fexist("&fileref") then put "File exists.";
else put "File does not exist.";
run;

filename &fileref clear;


******************************Blueridge**************************************;
PROC IMPORT OUT= IN1.PERSON
DATAFILE= "/home/u63616417/sasuser.v94/v24_y2022/in/Hotsprings2022/Person_Other_LPHHotSprings_settlement.csv"
DBMS=csv REPLACE ;
GETNAMES=YES;
RUN;


PROC IMPORT OUT= IN2.DIAG
DATAFILE= "/home/u63616417/sasuser.v94/v24_y2022/in/Hotsprings2022/Diagnosis_2021_LPHHotSprings.csv"
DBMS=CSV REPLACE ;
GETNAMES=YES;
RUN;

%INCLUDE "/home/u63616417/sasuser.v94/v24_y2022/V2422P1P.SAS";

RUN;
PROC EXPORT
DATA= Out.PERSON
OUTFILE='/home/u63616417/sasuser.v94/v24_y2022/out/Hotsprings2022/Score_Person_Other_LPHHotSprings2022New_settlement.csv'
DBMS = CSV REPLACE;
RUN;



This is the error that I get in the log file 

NOTE: %INCLUDE (level 2) ending.
NOTE: %INCLUDE (level 1) resuming.
WARNING: Physical file does not exist, /home/u63616417/sasuser.v94/v24_y2022/AGESEXV2.sas.
ERROR: Cannot %INCLUDE member AGESEXV2 in the aggregate IN0.
WARNING: Physical file does not exist, /home/u63616417/sasuser.v94/v24_y2022/V24I0ED2.sas.
ERROR: Cannot %INCLUDE member V24I0ED2 in the aggregate IN0.
WARNING: Physical file does not exist, /home/u63616417/sasuser.v94/v24_y2022/V24H86L1.sas.
ERROR: Cannot %INCLUDE member V24H86L1 in the aggregate IN0.
WARNING: Physical file does not exist, /home/u63616417/sasuser.v94/v24_y2022/V24H86H1.sas.
ERROR: Cannot %INCLUDE member V24H86H1 in the aggregate IN0.
WARNING: Physical file does not exist, /home/u63616417/sasuser.v94/v24_y2022/SCOREVAR.sas.
ERROR: Cannot %INCLUDE member SCOREVAR in the aggregate IN0.
Syed_Najeeb_0-1711018142294.png

 

1 REPLY 1
SASJedi
SAS Super FREQ

The %INCLUDE statements in your program are intended to read in text from an external file and process it as SAS code.

 

%INCLUDE "/home/u63616417/sasuser.v94/v24_y2022/AGESEXV2.SAS";
%INCLUDE "/home/u63616417/sasuser.v94/v24_y2022/SCOREVAR.SAS";
%INCLUDE "/home/u63616417/sasuser.v94/v24_y2022/V24H86H1.SAS";
%INCLUDE "/home/u63616417/sasuser.v94/v24_y2022/V24H86L1.SAS";
%INCLUDE "/home/u63616417/sasuser.v94/v24_y2022/V24I0ED2.SAS";

Your log indicates that those files don't really exist, so a WARNING and ERROR is generated for each bad file name:

WARNING: Physical file does not exist, /home/u63616417/sasuser.v94/v24_y2022/AGESEXV2.sas.
ERROR: Cannot %INCLUDE member AGESEXV2 in the aggregate IN0.
WARNING: Physical file does not exist, /home/u63616417/sasuser.v94/v24_y2022/V24I0ED2.sas.
ERROR: Cannot %INCLUDE member V24I0ED2 in the aggregate IN0.
WARNING: Physical file does not exist, /home/u63616417/sasuser.v94/v24_y2022/V24H86L1.sas.
ERROR: Cannot %INCLUDE member V24H86L1 in the aggregate IN0.
WARNING: Physical file does not exist, /home/u63616417/sasuser.v94/v24_y2022/V24H86H1.sas.
ERROR: Cannot %INCLUDE member V24H86H1 in the aggregate IN0.
WARNING: Physical file does not exist, /home/u63616417/sasuser.v94/v24_y2022/SCOREVAR.sas.
ERROR: Cannot %INCLUDE member SCOREVAR in the aggregate IN0.

You specify the file by providing a combination of path and filename like this:
 "/home/u63616417/sasuser.v94/v24_y2022/AGESEXV2.SAS"

and remember, everything is case-sensitive in Linux. 

It is unusual for SAS program files to be located in your SASUSER folder structure. Ensure your path and filename are correct and the casing is current, too. 

Check out my Jedi SAS Tricks for SAS Users

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 261 views
  • 0 likes
  • 2 in conversation