Thanks I will check it out. In the meantime I have come up with the following... this produces exactly what I need, but is there an easier way?
--------------------------
-SET &ECHO=ALL;
SET GRAPHSERVURL=
http://whatever...
TABLE FILE CAR
SUM SALES BY COUNTRY
ON TABLE HOLD AS PASS1
END
TABLE FILE PASS1
PRINT COUNTRY BY LOWEST COUNTRY NOPRINT
ON TABLE HOLD AS PASS2
END
-RUN
-SET &X=1;
-SET &MYCOUNT=&RECORDS;
-STARTLP;
-SET &PDF=IF &X EQ &MYCOUNT THEN 'CLOSE' ELSE 'OPEN';
-READ PASS2 &COUNTRY.A10.
-TYPE &COUNTRY
-********
-SET &MYGIF='DISK D:\PATH\IMAGE_' || &X || '.GIF' ;
FILEDEF MYGIF &MYGIF
GRAPH FILE PASS1
SUM SALES
BY COUNTRY
WHERE COUNTRY EQ '&COUNTRY';
ON GRAPH HOLD AS MYGIF FORMAT GIF
END
-SET &E = 'E=D:\PATH\IMAGE_&X.EVAL.GIF';
TABLE FILE CAR
SUM DEALER_COST
BY COUNTRY
WHERE COUNTRY EQ '&COUNTRY';
HEADING
"TESTING"
ON TABLE PCHOLD FORMAT PDF &PDF
ON TABLE SET STYLE *
TYPE=HEADING,
IMAG&E,
SIZE=(4 2),
POSITION=(0.2 0.8),$
ENDSTYLE
END
-SET &X=&X+1;
-IF &X LE &MYCOUNT THEN GOTO STARTLP;