BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
smart
Fluorite | Level 6

 

Hello. I really need help with this task that I have been given for SAS studio. I only have the start of the code:

 

data Depression;
infile '/courses/ddb976e5ba27fe300/NHANES 2013_2014';

 

I would be eternally grateful if someone helped me. I have no idea what to do next for this code. I don't even understand what variables I need to use. I would appreciate any help at all that helps point me in the right direction! The prompt for my task is below:

 

Create a temporary data set called Depression that reads the dpq_h_errors SAS data set and changes all impossible values in the depression variables to missing. The dpq_h_errors data set is stored in the /courses/ddb976e5ba27fe300/NHANES 2013_2014 folder.

 

The possible values are listed for each variable at:

https://wwwn.cdc.gov/Nchs/Nhanes/2013-2014/DPQ_H.htm

1 ACCEPTED SOLUTION

Accepted Solutions
Astounding
PROC Star

You're definitely off track here.  The code that you have written so far would not locate an existing SAS data set.  Here's a better start:

 

libname in '/courses/ddb976e5ba27fe300/NHANES 2013_2014';

 

proc contents data=in.dpq_h_errors;

run;

proc print data=in.dpq_h_errors (obs=10);

run;

 

That's the way to locate an existing data set, and to get an initial idea of what is in it.

 

If this program doesn't work, it's because the path to the folder that holds the data isn't quite right.  You would need to find the proper folder in that case.

View solution in original post

2 REPLIES 2
Astounding
PROC Star

You're definitely off track here.  The code that you have written so far would not locate an existing SAS data set.  Here's a better start:

 

libname in '/courses/ddb976e5ba27fe300/NHANES 2013_2014';

 

proc contents data=in.dpq_h_errors;

run;

proc print data=in.dpq_h_errors (obs=10);

run;

 

That's the way to locate an existing data set, and to get an initial idea of what is in it.

 

If this program doesn't work, it's because the path to the folder that holds the data isn't quite right.  You would need to find the proper folder in that case.

smart
Fluorite | Level 6

Thank you!!

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 2 replies
  • 1473 views
  • 3 likes
  • 2 in conversation