01-26-2012 03:25 PM
I really need help with this !
i need to receive 3 files into a macro ( english comp and sat ) . i have written it but have a small problem with calling a file in a loop . you can see below . hope someone can help me please . no sure what i should put on line 1559 because "file" is part of the macro and also "i". maybe my input is not correct ....
1555 %macro cg (file1,file2,file3);
1556 options mprint symbolgen mlogic;
1557 %do i = 1 %to &3;
1558 data cg&i;
1559 set &file&i;
1560 f&i= (x*m)/100;
1565 %cg (math, english, sat)
01-26-2012 04:13 PM
thank you it worked!!!! could you please help me with this :
i need to receive 3 files X1 X2 and X3
trying to do it in a Marco but i have a problem with the loop and the sequence, i have tried so many differnt things ways its driving me mad ... thanks ... CL
%do i=1 %to 3;
ERROR: Physical file does not exist, c:\X.1txt.
01-26-2012 04:23 PM
Sure. 2 dots after the &i:
The 1st dot terminates macro replacement, and the second is the literal "." before the extension.
I'm glad my earlier response helped. Good luck.
01-26-2012 04:18 PM
data math english sat;
do x=1 to 5;
do m=2 to 6;
options mprint symbolgen mlogic;
%macro cg (file1,file2,file3);
%do i = 1 %to 3;
%cg (math, english, sat)
Need further help from the community? Please ask a new question.