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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.