views:

185

answers:

2

How do I view the file below in Enterprise Guide (v 4.1 ) ??

%let libWORK=%sysfunc(pathname(WORK)); * work lib is on UNIX ;
data _null_;
    file "&libWORK./MYFILE.htm";
    put '<html>' /
     ' <head>'/
     '  <title> A Title </title>'/
     '</head> <body> some content </body> </html>';
run;
A: 

Got it! eventually.

data _null_;
    file print;
    infile "&libWORK./MYFILE.htm"; 
    input;
    put _infile_;
run;
Bazil
A: 

actually - annoyingly - my previous solution didn't help. SAS still applies a 'wrapper' to the HTML, destroying any header information (eg Javascript functions).

The following will fix it - basically run a dummy piece of code to create the reference in your EG session, then proceed to overwrite it with some pure html of your choosing! The link will remain...

%let libWORK=%sysfunc(pathname(WORK)); * work lib is on UNIX ; 
ods html body="&libWORK./MYFILE.htm" ;
data _null_;
 file print;
 put "this will be overwritten! ";
run;
ods html close;

data _null_; 
    file "&libWORK./MYFILE.htm"; 
    put '<html>' / 
        '       <head>'/ 
        '               <title> A Title </title>'/ 
        '</head> <body> some content </body> </html>'; 
run;
Bazil