Domanda

Come posso visualizzare il file seguente nella Guida Enterprise (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;
È stato utile?

Soluzione 2

In realtà - fastidiosamente - la mia soluzione precedente non mi ha aiutato. SAS applica ancora un "wrapper" all'HTML, distruggendo qualsiasi informazione di intestazione (ad esempio funzioni Javascript).

Risolverà quanto segue: fondamentalmente esegui un codice fittizio per creare il riferimento nella tua sessione EG, quindi procedi a sovrascriverlo con qualche HTML puro di tua scelta! Il link rimarrà ...

%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;

Altri suggerimenti

Capito! alla fine.

data _null_;
    file print;
    infile "&libWORK./MYFILE.htm"; 
    input;
    put _infile_;
run;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top