Question

Comment afficher le fichier ci-dessous dans le Guide de l'entreprise (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;
Était-ce utile?

La solution 2

En fait - ennuyeusement - ma solution précédente n’a pas aidé. SAS applique toujours un "wrapper" au code HTML, détruisant toute information d'en-tête (par exemple, les fonctions Javascript).

Ce qui suit résoudra le problème: exécutez un code factice pour créer la référence dans votre session EG, puis écrasez-le avec du code HTML pur de votre choix! Le lien restera ...

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

Autres conseils

Compris! finalement.

data _null_;
    file print;
    infile "&libWORK./MYFILE.htm"; 
    input;
    put _infile_;
run;
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top