BookmarkSubscribeRSS Feed
c-skissner
Fluorite | Level 6

Good Afternoon, I am trying to setup the SAS Programs with Test Modules for the CAHPS survey.  The program and test modules come from this link:

https://www.ahrq.gov/cahps/surveys-guidance/helpful-resources/analysis/index.html

 

  • Open link
  • Scroll midway to download files

 

 

  • Download the zip file called:  “SAS programs with test modules”.

 

I am having an issue with errors after setting up cahps macro and test modules.  Is there a step-by-step guide to setup the cahps macro or is there a tutorial that will provide the necessary steps.  I believe it is the programing or connecting the cahps macro to my files. Please see that attachment with the errors I am receiving.  

2 REPLIES 2
Reeza
Super User
Sorry, can't read attachments so no idea what errors you're getting. Usually you need to at minimum update the paths to the files and folders in the code. Did you do that and did that portion of the step run correctly?
ballardw
Super User

Near the top of your code you show

93         libname in        "&root./sasdata/CombinedHCBSCAHPS_2019.csv" ;
NOTE: Library IN does not exist.

CSV files cannot be libraries. I don't believe any text file can be a library.

So go back and read the set up instructions, if any about what library IN is supposed to have.

A CSV file could be used in a FILENAME statement to create a reference to read the text into a SAS data set.

 

These

94         libname out       "&root./sasdata/control/" ;
NOTE: Library OUT does not exist.
95         libname library   "&root./sascatalog/" ;
NOTE: Library LIBRARY does not exist.

Look like the definitions have issues that perhaps the path, using your shown value for the macro variable &root,

 

The syntax is mixing Windows: Z:\CAHPS and unix path elements, /sasdata/control.

So you need to verify 1) which OS you are using and 2) make sure that the PATH used actually exists on the machine running the code. Note that if you are running in one of the server versions of SAS that you need to make sure the path is valid from the server. Your local files would not be visible in most set ups to a server and would almost certainly have a different path to use.

 

Which may be the cause of

ERROR: Physical file does not exist, Z:\CAHPS\output\control.txt.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE PRINTTO used (Total process time):

when using

99         filename outfile  "&root./output/&ProgramName..txt" ;

Most of your errors relate non-existent files or paths and/or the not created data sets and values that attempt to use them.

 

You should post log entries by 1) copying the code from the log, 2) open a code box on the forum using the {I} icon at the top of the message window and then 3) pasting. This should be easier than creating Word document.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 977 views
  • 0 likes
  • 3 in conversation