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

Hi

I am running a SAS program that generates 3 files in memory. The total records in each file is no more than 3000 records, which is significantly smaller than others I have run. I have been making changes to this program and have gotten the attached error periodically and now can't get rid of it. Is this just a warning or did I do something wrong in the code?

Paul

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Add noprint option to proc means to supress the printing, its the only thing I see that would be generating graphics.

View solution in original post

7 REPLIES 7
ChrisHemedinger
Community Manager

Does your program generate any plots using GCHART or GPLOT?  If so, are you using ActiveX as the graph device (the default)?  If so, consider changing to use PNG.  This would reduce the size of the HTML, SAS Report, or RTF output.  See more here:

SAS Enterprise Guide options: my favorite 5 - The SAS Dummy

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Paul_NYS
Obsidian | Level 7

No. It just writes out the result to the 'Results' tab in EG and I create 3 files in the Work directory.

Does this prevent processing for some reason?

Paul

Reeza
Super User

What does your SAS program look like?

Paul_NYS
Obsidian | Level 7

Here it is below. It is a macro. There is the creation of a s3 data set that precedes this, but that already existed.

%macro medianTimes (a,b,c,d,e,f,g,h,i,j);

data &h (rename=(agecat4b=AgeRange adjud_cat1=OutcomeType));

length agecat4b $ 20;

set &a;

if spellage in (0, 1, 2, 3) then agecat4b="0 to 3";

if spellage in (4, 5, 6) then agecat4b="4 to 6";

if spellage in (7, 8, 9) then agecat4b="7 to 9";

if spellage in (10, 11, 12) then agecat4b="10 to 12";

if spellage in (13, 14, 15) then agecat4b="13 to 15";

if spellage in (16, 17) then agecat4b="16 to 17";

if spellage > 17 or spellage eq . or spellage < 0 then agecat4b="Invalid Age";

drop agecat4;

if censor_adjud1=1 then dur_adjud1=.;

run;

proc sort data=&h out=&h;

by &b;

run;

proc means data=&h;

var &c;

by &b;

output out=issue1 n= nmiss= median= q3= /autoname;

run;

data issueMedian (rename=(_FREQ_=TotalChildren &c._N=NumberIssue

&c._NMiss=NumberMissingIssue &c._Median=MedianNumber

&c._Q3=ThirdQuartileNumber));

set issue1;

if &c._N >= &c._NMiss;

drop _TYPE_ &c._Q3;

run;

data issueThirdQ (rename=(_FREQ_=TotalChildren &c._N=NumberIssue

&c._NMiss=NumberMissingIssue &c._Median=MedianNumber

&c._Q3=ThirdQuartileNumber));

set issue1;

if &c._N >= (round(.75*_FREQ_));

drop _TYPE_ &c._Median _FREQ_ &c._N &c._NMiss;

run;

proc sort data=issueMedian;

by &b;

run;

proc sort data=issueThirdQ;

by &b;

run;

data &d;

merge issueMedian issueThirdQ;

by &b;

if &e.="New York City" then cnty_name="New York City";

if &e.="New York State" then cnty_name="New York State";

Measure=&f;

run;

data &d (rename=(cnty_name=County &g.=CohortYear MedianNumber1=MedianNumber ThirdQuartileNumber1=ThirdQuartileNumber));

length Measure $ 50 cnty_name $ 30 &g 3 AgeRange $ 20 OutcomeType $ 30 TotalChildren 3 NumberIssue 3 NumberMissingIssue 3 MedianNumber 3 ThirdQuartileNumber 3;

set &d;

MedianNumber=(MedianNumber/30.5);

ThirdQuartileNumber=(ThirdQuartileNumber/30.5);

MedianNumber1=round(MedianNumber,.01);

ThirdQuartileNumber1=round(ThirdQuartileNumber,.01);

drop MedianNumber ThirdQuartileNumber;

if &i.="T" then AgeRange="All Ages";

if &i.="T" and &j.="F" then OutcomeType="All Adjudications";

if &i.="F" and &j.="F" then OutcomeType="All Adjudications";

if cnty_name="NewYork" then cnty_name="New York";

run;

%mend medianTimes;

%medianTimes (s3, cnty_name year OutcomeType, dur_adjud1, adjudCountiesNNNACat, cnty_name, "A/N Petition Filing to Adjudication", year, s3W3,"T","T");

%medianTimes (s3, cnty_name year AgeRange, dur_adjud1, adjudCountiesNNNA, cnty_name, "A/N Petition Filing to Adjudication", year, s3W1,"F","F");

%medianTimes (s3, cnty_name year, dur_adjud1, adjudCountiesNNNAAllage, cnty_name, "A/N Petition Filing to Adjudication", year, s3W2,"T","F");

%medianTimes (s3, cnty_name year OutcomeType, dur_adjud1, adjudCountiesNNNACat, cnty_name, "A/N Petition Filing to Adjudication", year, s3W3,"T","T");

Reeza
Super User

Add noprint option to proc means to supress the printing, its the only thing I see that would be generating graphics.

ChrisHemedinger
Community Manager

I asked about graphics because ActiveX scripting tends to get verbose, and with lots of data points or BY groups the resulting HTML or SAS Report can get quite large.

However, the same thing can happen with any PROC that produces ODS output ("printed" tables) with many BY groups.  The NOPRINT suggestion is good, as long as you don't need to see the printed output from PROC MEANS.

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Paul_NYS
Obsidian | Level 7

Adding Noprint was it Reeza and Chris. I would not have thought that would be an issue because of the size of data I have used in the past without getting that, but it did it. Thanks a lot!

Paul

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 7 replies
  • 5260 views
  • 3 likes
  • 3 in conversation