DATA Step, Macro, Functions and more

Cant find newly created dataset

Occasional Contributor
Posts: 12

Cant find newly created dataset

Hello everyone,


I am attempting to compute a new variable (BMI) with existing observations of weight and height. I have two questions.


1. how do I report BMI as "missing" if either the height or weight variables are missing for a subject?

2. I tried to calculate it but I don't know how to access the newly created data set that I believe is supposed to result of this command. 


Here is a photo of the code and log. Thank you for any help!


Screen Shot 2017-10-30 at 2.06.30 AM.pngScreen Shot 2017-10-30 at 2.16.45 AM.png

Super Contributor
Posts: 271

Re: Cant find newly created dataset

I think you should take this free course on SAS Programming 1: Essential



Otherwise to your question, you can use If statment to handle BMI in case of missing values.


Go to Work library and find your output dataset. Or you can point your output dataset to PI library.


Super User
Posts: 10,592

Re: Cant find newly created dataset

Code and logs are TEXT. Please post as such. Don't expect the people here to re-type from pictures.

Also supply example data. Use the macro from to convert your dataset P1.PROJECT1 to a data step, and post that according to, so we can recreate your dataset for testing with copy/paste and submit.

Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Ask a Question
Discussion stats
  • 2 replies
  • 3 in conversation