You can reference supporting files (for example, JavaScript and CSS) in SAS Job Execution HTML output by uploading those files to the Files service and then retrieving them through the SAS Job Execution Web Application using the _file= parameter.
For more information, see Deploy DDC Implementation Files in SAS Content Server via SAS Viya GUIs (SAS Communities).
In some environments, however, files referenced via _file= might intermittently fail to load and generate errors that prevent the referenced resources from running correctly. This is a known issue in SAS® Viya®. Until a permanent fix is available, complete the workarounds below to circumvent the issue.
Note: The examples below follow the approach described in the SAS Communities article linked above.
Complete any of the following workarounds to circumvent this issue:
Instead of relying on _file= as a runtime fetch, include the code reference as plain text directly within the Form Code section of the SAS Job Execution job. This workaround can avoid intermittent file retrieval or serving failures.
When you import files through the SAS Job Execution wizard, do not include a file extension in the imported name.
Here is an example:
Then, reference the resources using the imported name (without an extension). This workaround reduces failures when serving content through _file=.
Instead of retrieving resources through _file=, reference the file directly using the Files service path:
This approach bypasses _file= and relies on the Files service to deliver the resource directly.
If you are troubleshooting a failure, confirm that the file returns with the correct HTTP status code and Content-Type. (For example, JavaScript should be returned as JavaScript, not text/plain.) Browser developer tools (the Network tab) are the fastest way to verify what is actually being served.