From: cherub on 6 Nov 2009 14:13 I have a master SAS data which has serveral agents information, I want to= =A0split data into small data by each agent and export each small data into= Excel. =A0 the orginal code is list here,=20 =A0 %macro getlist(agtnum,agtname); data agtlist; set cat.wharton_list_0110; where agtnum=3D"&agtnum"; proc export data=3Dagtlist outfile=3D"C\&agtname._&agtnum..xls" dbms=3Dexcel2000 replace; run; %mend; data Client_List; =A0 set cat.wharton_list_0110; by agtnum; /*format agtname $30.;*/ /*i move this to somewhere ahead*/ if first.agtnum then=20 call execute('%getlist('||agtnum||','||trim(left(agtname))||')'); /*i dropp= ed trim(left( )) around agtnum1 here and added it around agtname.*/ run; =A0 However, sometimes it works well, but sometimes i got error like this,=20 ERROR: All positional parameters must precede keyword parameters. ERROR: All positional parameters must precede keyword parameters. ERROR: All positional parameters must precede keyword parameters. ERROR: Macro parameter contains syntax error. ERROR: All positional parameters must precede keyword parameters. =A0 Can anybody help with that, thank you very much.=0A=0A=0A
|
Pages: 1 Prev: Writing a paragraph of text in ODS Next: Macro error help |