w*******9 发帖数: 1433 | 1 As a guy new to sas, I feel like I have millions of questions to ask
everyday. While you could solve most of them with the help of Internet, for
some of them, you don't even have a clue how to google!
Again, baozi and sincere appreciation for helpful suggestions. Would like to
generate multiple pdf files in a do loop and save each of them separately.
--------------------
%do it=1 %to 50;
ods pdf file="plot&it.pdf";
proc gplot data=data⁢
plot y*x=z;
run;
ods pdf close;
%end;
---------------------
While doing this, I am only able to save plot50.pdf. It seems I have lost
the previous 49 files. |
d******9 发帖数: 404 | 2 It should work, the codes look fine except:
ods pdf file="plot&it..pdf";
You need use 2 dots rather than 1 dot after the macro variable. |
w*******9 发帖数: 1433 | 3 Right. An additional dot to end the macro reference. But this method only
gives me the last plot. The previous plots have not been outputted.
【在 d******9 的大作中提到】 : It should work, the codes look fine except: : ods pdf file="plot&it..pdf"; : You need use 2 dots rather than 1 dot after the macro variable.
|
f******1 发帖数: 119 | 4 这个问题和我先前的那个很类似, 是不是DO的位置不对,而造成了循环到最后一步,
前面的都被OVERWRITE了。等大牛dido2009来解释。 |
w*******9 发帖数: 1433 | 5 Thanks guys I figured it out. Since I used the path "plot&it..pdf", only the
last graph prompted out and I have no idea where the rest files are written
by default. I then changed the path and I did find 50 files there. |