sas ods - How can I create SAS html files with names corresponding to a dataset field -


i'm trying create file each record in sas dataset. have been able succesfully using sas ods output using "newfile=page" option , running proc report on dataset. problem i'm having results in gerneric, sequentially numbered file names (test, test1, test2, etc...). i'd name each file based on variable in dataset. in example below, i'd file names titled based on "seq_nbr" in dataset.

    ods html path = "c:\test\"     file = 'test.html'     contents = 'contents.html     frame = 'frame.html'     code = (url="c:\test\javascript.js")     newfile=page;      proc report data = test2 nowindows headline headskip;     column tdate ttime created_by cmttext;     seq_nbr;      run; 

you need macro this

%macro doit; proc sql; select count(*) :n test2 ; quit;  %do i=1 %to &n; data _null_; if _n_=&i call symput('name',seq_nbr); run;  proc export data=something outfile="&name"; run; %end;  %mend; %doit; 

Comments

Popular posts from this blog

android - questions about switching from C2DM to GCM -

c++ - Qt setGeometry: Unable to set geometry -

batch file - How to extract all multi-volume RAR archives from subfolders of a folder? -