BookmarkSubscribeRSS Feed
GPatel
Pyrite | Level 9

Where to find/locate code for %_sas_popchartsize and  %_sas_pushchartsize macro?

( One can find the code for %_EG_CONDITIONAL_DROPDS at support.sas.com\kb\38\454.html )

4 REPLIES 4
ChrisHemedinger
Community Manager

If you select File->Export->Export All Code in Project, the result *should* include all source code for any macros that your project tasks reference.

Chris

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

Chris,

I tired that. I don't see any source code for either %_EG_CONDITIONAL_DROPDS or %_SAS_POPCHARTSIZE.

ChrisHemedinger
Community Manager

Okay, here it is:

/* save the current settings of XPIXELS and YPIXELS */

/* so that they can be restored later               */

%macro _sas_pushchartsize(new_xsize, new_ysize);

  %global _savedxpixels _savedypixels;

  options nonotes;

  proc sql noprint;

  select setting into :_savedxpixels

  from sashelp.vgopt

  where optname eq "XPIXELS";

  select setting into :_savedypixels

  from sashelp.vgopt

  where optname eq "YPIXELS";

  quit;

  options notes;

  GOPTIONS XPIXELS=&new_xsize YPIXELS=&new_ysize;

%mend;

/* restore the previous values for XPIXELS and YPIXELS */

%macro _sas_popchartsize;

  %if %symexist(_savedxpixels) %then %do;

  GOPTIONS XPIXELS=&_savedxpixels YPIXELS=&_savedypixels;

  %symdel _savedxpixels / nowarn;

  %symdel _savedypixels / nowarn;

  %end;

%mend;

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

Thanks Chris. This is what I was looking for.


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
  • 4 replies
  • 1817 views
  • 0 likes
  • 2 in conversation