*(Q) I have a table that looks like id, var1 1, AAA 2, BBB 3, AAA 4, BBB 5, CCC 6, AAA 7, FFF etc... and I would like to run a code for all the instances of var1, using the values of var1 to call a Macro, such as !Macro1 var="AAA" !Macro1 var="BBB" etc... *(A) Posted to newsgroup by Raynald Levesque on 2003/04/11. DATA LIST LIST /id (F3) var1(A3). BEGIN DATA 1 AAA 2 BBB 3 AAA 4 BBB 5 CCC 6 AAA 7 FFF END DATA. AGGREGATE OUTFILE=* /BREAK=var1 /notused=N. WRITE OUTFILE='c:\\temp\\call macro.sps' /'!macro1 var="'var1'".'. EXECUTE. INCLUDE 'c:\\temp\\call macro.sps'. *** This is the content of "call macro.sps" !macro1 var="AAA". !macro1 var="BBB". !macro1 var="CCC". !macro1 var="FFF".