BookmarkSubscribeRSS Feed
Ruhi
Obsidian | Level 7

Hi All

I am working on a large data set for first time, and I have to choose couple variables from the given long list of given thousands of variables . Also dataset has around 850,000 observations.  Every time I run two or three data steps in sas , sas tells me output window full. (NOTE: SAS IN WINDOW ENVIRONMENT), I know unix does better, but don't have that.

Question1: how to deal with this issue. How to clear output window. I tried ODS HTML CLOSE;ODS HTML;

but when sas output window is full it does not allow me to run these commands. If you have other good ideas to share on big data management that would be helpful.

Second question: How to cut short my data set to try to get required data , I mean I want to try my commands on a small subset of data to see if they work properly , so that later I can apply them on entire data set to get my required data to carry out the analysis.

Thanks for your time

Ruhi

6 REPLIES 6
ballardw
Super User

ods listing close; If output is going to window.

to select a limited number of records (observations) you can use the dataset option OBS= anytime you are reading a dataset:

proc freq data=example(obs=100);  to use 100 records from the dataset example.

data want;

     set have (obs=100 ); to read 100 records into the new data set.

If you only want to have a few variables out of a long list then you can use the KEEP= option

data want;

     set have (keep= varname1 anothervarname thatvar);

You must be generating output to fill up the window. What are you doing to write to the output window in a data step?

Ruhi
Obsidian | Level 7

I am not choosing any output destination.

Would writing output in a Libref.dataset_name would help.

ballardw
Super User

Depending on your install SAS will default to sending some types of output to either the Listing destination (Output window) or HTML (Results window) and possibly both. If you are running DATASTEP code and having the Output window fill up, then your code is being told to write output, possibly with a FILE PRINT statement. You might want to post an example of the code that is causing the issue.

And since datastep code will generate an output data set unless using the special set _NULL_, I really am curious what you're doing currently.

Ksharp
Super User

ods _all_ close;

OR

use proc printto to redirect the LOG into a external LOG file .

LearnByMistk
Obsidian | Level 7

data want (keep = a b c );

set have (obs=200);

run;

if you want to  create a random sample then

data want(keep=a b c drop=i );

do i =1 to 5000 by 10;

set have;

end;

output;

run ;

jakarman
Barite | Level 11

In the ancient time when big data meant you had a lot of cartons with punch cards the interface was designed for humand access.

- sysin      where you put your cards in.

- print       that print on real paper for the results

- saslog   The messages what your program did.

These basics are still there. As it should human readable there has been limits set on the log and Print.

When your ouput is going to a file you can turn the results off. SAS(R) 9.4 Output Delivery System: User's Guide, Third Edition

As you are under a windows license with DMS

There are al lot of windows-specific options. SAS(R) 9.4 Companion for Windows, Third Edition

But the sizing of the log is set to 9999 for all OS types.  SAS(R) 9.4 System Options: Reference, Third Edition  dmslogsize

the output (results) can also be set. SAS(R) 9.4 System Options: Reference, Third Edition DMSOUT 2G of lines is an awful lot

You could cleanup before your are going to run.

---->-- ja karman --<-----

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
  • 6 replies
  • 944 views
  • 0 likes
  • 5 in conversation