Question

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;
Was it helpful?

Solution 2

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;

OTHER TIPS

Got it! eventually.

data _null_;
    file print;
    infile "&libWORK./MYFILE.htm"; 
    input;
    put _infile_;
run;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top