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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

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