1 ;*';*";*/;quit;run; 2 OPTIONS PAGENO=MIN; 3 %LET SYSLAST=SASHELP.'BASEBALL'n; 4 %LET _CLIENTTASKLABEL='Program - Copy'; 5 %LET 5 ! _CLIENTPROJECTPATH=''; 6 %LET _CLIENTPROJECTNAME=''; 7 %LET _SASPROGRAMFILE=; 8 %LET DIV = West; 9 %LET DIV_count = 1; 10 11 ODS _ALL_ CLOSE; 12 OPTIONS DEV=ACTIVEX; 13 GOPTIONS XPIXELS=0 YPIXELS=0; 14 FILENAME EGSR TEMP; 15 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR 16 STYLE=HtmlBlue 17 STYLESHEET=(URL="file:///C:/Program%20Files%20(x86)/SAS94/x86/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css") 18 NOGTITLE 19 NOGFOOTNOTE 20 GPATH=&sasworklocation 21 ENCODING=UTF8 22 options(rolap="on") 23 ; NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR 24 25 GOPTIONS ACCESSIBLE; 26 27 *%put _all_ ; 28 options symbolgen mlogic mfile ; 29 *options nosymbolgen nomlogic nomfile ; 30 *options nomstored ; 31 32 %macro LOOP_ia ; 33 %do i = 1 %to &DIV_COUNT. ; 34 proc sql ; 35 create table DIV_&&DIV&i. as 36 select Name 37 ,Team 38 ,Division 39 ,Div 40 ,League 41 ,Position 42 from SASHELP.BASEBALL 43 where Division = propcase("&&DIV&i.") 44 order by Team, Name, Position 45 ; 46 quit ; 47 %put &DIV. ; 48 %end ; 49 %mend LOOP_ia ; 50 51 %LOOP_ia ; MLOGIC(LOOP_IA): Beginning execution. SYMBOLGEN: Macro variable DIV_COUNT resolves to 1 MLOGIC(LOOP_IA): %DO loop beginning; index variable I; start value is 1; stop value is 1; by value is 1. SYMBOLGEN: && resolves to &. SYMBOLGEN: Macro variable I resolves to 1 NOTE: Line generated by the macro variable "I". 51 DIV_&DIV1 _ 22 200 WARNING: Apparent symbolic reference DIV1 not resolved. SYMBOLGEN: && resolves to &. SYMBOLGEN: Macro variable I resolves to 1 WARNING: Apparent symbolic reference DIV1 not resolved. ERROR 22-322: Syntax error, expecting one of the following: (, '.', AS, LIKE. ERROR 200-322: The symbol is not recognized and will be ignored. NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements. NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE SQL used (Total process time): real time 0.01 seconds cpu time 0.03 seconds MLOGIC(LOOP_IA): %PUT &DIV. SYMBOLGEN: Macro variable DIV resolves to West West MLOGIC(LOOP_IA): %DO loop index variable I is now 2; loop will not iterate again. MLOGIC(LOOP_IA): Ending execution. 52 53 GOPTIONS NOACCESSIBLE; 54 %LET _CLIENTTASKLABEL=; 55 %LET _CLIENTPROJECTPATH=; 56 %LET _CLIENTPROJECTNAME=; 57 %LET _SASPROGRAMFILE=; 58 59 ;*';*";*/;quit;run; 60 ODS _ALL_ CLOSE; 61 62 63 QUIT; RUN; 64