data _null_;
rc=gset('catalog','work','gseg');
rc=ginit();
array glist {*} $ g1 - g&total;
grafs=dim(glist);
/* fill array with names of grseg entries */
call gask('graphlist',grafs,of glist{*},rc3);
________________________________________________________________________
rc=gset('window',1,0,0,100,100);
rc=gset('transno',1);
________________________________________________________________________
do j=1 to &total;
/* Specify a name for the new graph this example assigns each */
/* graph with the name that corresponds to the page number on */
/* the graph. */
rc=graph('clear','PAGE'||left(j));
/* specify font for page number text */
rc=gset('texfont','centb');
/* place page number text on graph */
rc=gdraw('text',90,2,'Page '||left(j));
/* insert each graph in sequence */
rc=graph('insert',glist{j});
/* write the new graph to the current catalog */
rc=graph('update');
/* delete the original GCHART output */
rc=graph('delete',glist{j});
end;
________________________________________________________________________
rc=gterm();
run;