Hi:
Well, let's take a step back and just look at what you can do without MACRO or GREPLAY and using only COLUMNS=2 -- with SAS/GRAPH and SAS 9.2. I get 2 pies per page and 2 pages (since I have 4 regions) with the program below.
I am not sure that you need to go down the macro road just yet, until you have figure out whether simple BY group processing and COLUMNS=2 (in SAS 9.2) will work for you.
Next, you may want to explore ODS LAYOUT, as described in this paper:
http://www.wuss.org/proceedings09/09WUSSProceedings/papers/dpr/DPR-OConnor.pdf
Or, you may want to investigate some of the Macro and GREPLAY examples at this web site (which has many, many wonderful SAS/GRAPH examples):
http://www.robslink.com/SAS/Home.htm (when you drill down into one of the 48 major topics, you will see thumbnails of all the examples under that topic. From the thumbnail link, you can see a bigger picture and also download the code that created the example.)
cynthia
[pre]
ODS listing close;
option nodate nonumber orientation=landscape nobyline
topmargin=.25in bottommargin=.25in rightmargin=.25in leftmargin=.25in;
proc sort data=sashelp.shoes out=shoes;
where region in ('Asia', 'Canada', 'Pacific', 'Western Europe');
by region;
run;
ODS pdf file ="C:\temp\test.pdf" columns=2;
ODS GRAPHICS/NOBORDER;
ods pdf text=' ';
goptions reset=all device=pdfc hsize=4.0in vsize=4.0in;
proc gchart data=shoes;
title '#byval1';
by region;
pie product /sumvar=sales
noheading;
run;
quit;
ODS pdf close;
[/pre]