Hello I'm editing a SAS program with %macro/%mend funkction. For this macro I will make some loop´s. If Loop 1 is finished go to Loop 2 aso. In the report I have: %macro projekt_schleife(); *Code 1; /* ################################################################################################################ */ /* Uebersicht */ proc sql; create table work.uebersicht as select out.stand, out.&ebene, out.position, sum(out.aktuell_kumuliert_gj) format=commax16.2 as aktuell_kumuliert_gj, sum(out.aktuell_kumuliert_vj) format=commax16.2 as aktuell_kumuliert_vj, sum(out.aktuell_kumuliert_vvj) format=commax16.2 as aktuell_kumuliert_vvj, sum(out.vormonat_gj)format=commax16.2 as vormonat_gj, sum(out.vormonat_vj)format=commax16.2 as vormonat_vj from sasco2.output_bs_vbeitrag as out where out.&ebene IN (&vb) group by 1, 2, 3; quit; This ist the Code for the Loops. I Need the same request for every single Loop. %let top_x = 25; %let grenze1 = 100000; %let grenze2 = 30000; %let grenze3 = 5000; /******************Loop 1******************/ %Goto | %Go to label1; %label1: %let bereich = P0; %let bereich_druck = 'P0'; %let vb ='P'; %let ebene =vb0; %projekt_schleife(); ; /******************Loop 2******************/ %Goto | %Go to label2; %label2: %let bereich = P1; %let bereich_druck= 'P1'; %let vb ='1'; %let ebene = vb1; %projekt_schleife(); ; The error message is indicating that "The %GOTO statement is not valid in open code." and "Statement is not valid or it is used out of proper order." But what does this mean and how can I edit above to work? Thanks for any and all assistance.
... View more