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

Hi all, 

 

This is a very basic question but I cannot understand why no output table is being generated as of late.

 

A simple code to test this was used:

 

proc sort data=pg1.storm_summary out=Storm_sort;
where basin = 'na' or basin='NA';
by MaxWindMPH ;
run;

 

 

However, in neither my output nor my results viewer am I getting an output table which is problematic because I don't want to change my base data set for the project I am working on.

 

Thanks in advance

 

1 ACCEPTED SOLUTION

Accepted Solutions
SuryaKiran
Meteorite | Level 14

If your using SAS EG then check if you have '0' mentioned as shown in below screenshot (Tools>Options>Results). Add a number there instead of 0

image.png

Thanks,
Suryakiran

View solution in original post

11 REPLIES 11
novinosrin
Tourmaline | Level 20

Try this and let us know

 


proc sort data=pg1.storm_summary out=Storm_sort;
where upcase(strip(basin)) = 'NA';
by MaxWindMPH ;
run;

proc print data=Storm_sort(obs=100);
run;
joebacon
Pyrite | Level 9
This definitely works when I proc print, but the output tables used to generate off of PROC SORT.

Is this a setting that changed that i was unaware?
SuryaKiran
Meteorite | Level 14

If your using SAS EG then check if you have '0' mentioned as shown in below screenshot (Tools>Options>Results). Add a number there instead of 0

image.png

Thanks,
Suryakiran
joebacon
Pyrite | Level 9

I was running SAS 9.4 (base sas) but I think I am just going to switch over. 

 

Thank you for the help!

Reeza
Super User
AFAIK by default PROC SORT doesn't actually print any output as far as I know. The data set is sorted but there should not be any output regardless of what version you're using.
SuryaKiran
Meteorite | Level 14

@Reeza I don't this this is true when OUT= option is mention in PROC SORT. Correct me if I'm wrong.

Thanks,
Suryakiran
Reeza
Super User

@SuryaKiran wrote:

@Reeza I don't this this is true when OUT= option is mention in PROC SORT. Correct me if I'm wrong.


It still does not print any output with OUT= option. The OUT= in this case directs the sorted data set to a new data set, not the same name.

 

It's possible this behaved differently in SAS EG or Studio, but I suspect not, unless it was built into a task, but then I'd bet the code still shows a PROC PRINT after as well. 

SuryaKiran
Meteorite | Level 14

Make sense, thanks for the explanation.

Thanks,
Suryakiran
Reeza
Super User
Post the log. Is there any message about no open destination?
joebacon
Pyrite | Level 9
108 proc sort data=pg1.storm_summary out=Storm_sort;
109 where basin = 'na' or basin='NA';
110 by MaxWindMPH ;
111 run;

NOTE: There were 488 observations read from the data set PG1.STORM_SUMMARY.
WHERE basin in ('NA', 'na');
NOTE: The data set WORK.STORM_SORT has 488 observations and 12 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds



---------

The table is being created but not showing without prompting it with proc print. I should've specified before, but is there a way to change this?
SuryaKiran
Meteorite | Level 14

What does your log say?

Thanks,
Suryakiran

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

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 11 replies
  • 15248 views
  • 7 likes
  • 4 in conversation