i have a sas job execution. This job must show an image in background. At the moment i don't see the image.
my code:
data _null_;
file _webout;
put '<!DOCTYPE html>';
put '<html>';
put '<head><title>Hello World!</title></head>';
put '<body>';
put "<h1>Hello %sysfunc(htmlencode(&MYNAME))!</h1>";
put '<img src="/sasgrid/files/image.png">';
put '</body>';
put '</html>';
run;
Maybe i must save the image in an particular path?
Can you help me?
The image file must be stored in a location where the web browser can find it, either with a fully qualified URL or a location relative to the HTML file you're viewing.
If running in SAS Studio or EG, the HTML file will be "downloaded" as a result but the image file will not, so your browser cannot find it.
A solution might be to embed the image inline (like SVG) as supported in HTML5. This is documented in the ODS HTML5 statement options...but it's trickier to do if you're relying on DATA step to build the HTML by hand.
The image file must be stored in a location where the web browser can find it, either with a fully qualified URL or a location relative to the HTML file you're viewing.
If running in SAS Studio or EG, the HTML file will be "downloaded" as a result but the image file will not, so your browser cannot find it.
A solution might be to embed the image inline (like SVG) as supported in HTML5. This is documented in the ODS HTML5 statement options...but it's trickier to do if you're relying on DATA step to build the HTML by hand.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.