BookmarkSubscribeRSS Feed
DUBS
Fluorite | Level 6

I uploaded some programs to SAS Studio but as shown in the screenshot in the attached file, SAS doesn't seem to recognize them. I verified that the uploaded programs use UTF-8 consistent with SAS studio. What else might the problem be?

 

12 REPLIES 12
JackieJ_SAS
SAS Employee

Hi,
In your code, you issue a LIBNAME statement, then call the CONTENTS procedure referencing the library in your LIBNAME statement. The CONTENTS procedure lists only SAS datasets (file extension .sas7bdat). It does not list all file types in a folder. In particular it will not list SAS programs (file extension .sas).

You get that warning about "No matching members" because your programs folder does not have any SAS datasets in it.

JackieJ_SAS
SAS Employee

Instead, I suggest you point your LIBNAME statement to either your INPUT or OUTPUT folders, since those folders have SAS datasets in them.

DUBS
Fluorite | Level 6

Hello Jackie - Thank you for your reply. 

I think my problem is more related to the files in the program folder. I thought proc contents would be a simple way of showing this but I understand now why it isn't, thank you again for the clarification.  Attached is another screenshot form code that references one of the files in the program folder.  

I would appreciate any additional thoughts.

Reeza
Super User
Please post your images directly into the forum, not as attachments.
Reeza
Super User
Right click on the program you're trying to load, select properties. Compare the path to the path in the error messages and look for any differences, noting that the server is case sensitive.
JackieJ_SAS
SAS Employee

Hi, I suggest you post the entirety of your log here. After inspection of your second log image, I cannot immediately see why you are getting the "Physical file does not exist" warning. The file path in the warning seems to correspond to an existing folder. 

As another commenter added, you can copy your entire log then post it here directly using a particular button in the SAS Communities post editor. Also, you can right click on a file to get its full path, then copy and paste the Location field. This will ensure you didn't make any mistakes in the file path. For example: 

JackieJ_SAS_0-1708541254151.png

 

DUBS
Fluorite | Level 6

when i post my entire code, it looks like my response gets removed (the code is quite lengthy). with that in mind should i add it in an attachment?

DUBS
Fluorite | Level 6

since it seems I cannot submit the full code, I copied the portion with the error below. Does this help? 



262 263 %* include main macro; 264 %INCLUDE IN0(V2424P1M)/SOURCE2; WARNING: Physical file does not exist, /home/u886104/RiskAdjustment/programs/V2424P1M.sas. ERROR: Cannot %INCLUDE member V2424P1M in the aggregate IN0. 265 266 %V2424P1M(INP =IN1.PERSON, _ 180 WARNING: Apparent invocation of macro V2424P1M not resolved. ERROR 180-322: Statement is not valid or it is used out of proper order. 267 IND =IN2.DIAG, 268 OUTDATA =OUT.PERSON, 269 IDVAR =MBI, 270 KEEPVAR =MBI &INPUTVARS &SCOREVARS &DEMVARS 271 &HCCV24_list86 &CCV24_list86, 272 SEDITS =1, 273 DATE_ASOF="1FEB2024"D); 274 275 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK; 285
Tom
Super User Tom
Super User

The most likely cause is that you have the wrong filename.

Since the of this path looks like the name in the picture your put into a WORD file and uploaded before then perhaps the issue in the username part of the path?

/home/u886104/RiskAdjustment/programs/V2424P1M.sas

Perhaps the u should be uppercase? 

Perhaps you accidently typed the wrong userid?

 

So first try fixing where you defined the fileref IN0. That is where SAS got the 

/home/u886104/RiskAdjustment/programs

part of the path it is showing in the error message.

 

Or try eliminating the IN0 filref and just %INCLUDE the file using its actual name instead of making SAS piece the parts together.

 

Or use ~ in place of the /home/uxxxxx part of the path.

%INCLUDE "~/RiskAdjustment/programs/V2424P1M.sas" / source2;

The later errors don't matter now as they are just a side effect of the file not being included.

 

 

Tom
Super User Tom
Super User

If you want to run the programs just open them into the editor window and submit them.

 

PROC CONTENTS is for looking a datasets, not programs.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 12 replies
  • 3074 views
  • 0 likes
  • 5 in conversation