BookmarkSubscribeRSS Feed
jula
Calcite | Level 5

I wonder if I can see data going to an output file during each iteration while debugging. Using DEBUG option allows me to see what is going on during each iteration but I can’t see which data got written to an output file during each iteration.

I am taking SAS class but I can’t find an answer yet…I think it is important to know as some programs include more complex options like looping, retaining, output, @ or @@ etc.

Thanks

4 REPLIES 4
Reeza
Super User

I usually prefer a manual debugging process that uses put statements instead of the debugger.

Vish33
Lapis Lazuli | Level 10

As you enter into debugging , you can see the iterations step by step which does by PDV. But i think you can't able to see the output data as the data set is incompleted. Each iteration will give you one output record, once these iterations completed then you can able to see the data.

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Hi,

I would suggest that you create a dataset rather than looking at each row.  The reason being is that in general you will be applying logic to each and every observation.  Whilst it may seem beneficial to look at each observation each time if your dealing with very small datasets, once you get to bigger ones, merges etc. then it will become quite difficult.  Its generally pretty easier to see what is right/wrong in a dataset just by looking at it, for any specific thing, as Reeza has mentioned, there is the put statement. 

You also mention "data got written to an output file" as something you want to see.  I would suggest that you want to get your dataset one step away, i.e. get the dataset as you want then use basic output routines.  The reason is, depending on the output destination you may have markup or output specific things which you wouldn't want to see whilst getting your data running.

So keep it simple for the time being, datastep at a time, create what the output should look like then simple output procedure.  Examine datasets at each point.  As for looping/retaining, just don't drop the variables from the dataset and you can then see them as well.

jula
Calcite | Level 5

Thanks to all responses!

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 4 replies
  • 1000 views
  • 6 likes
  • 4 in conversation