BookmarkSubscribeRSS Feed

How to Fix Unformatted URL Job Results

Started ‎03-14-2025 by
Modified ‎03-14-2025 by
Views 563

If you have recently updated your release of SAS Viya and you have jobs that are submitted via a URL, you may have noticed that the results no longer appear formatted using standard SAS formatting. This is due to an update in the default content security policy setting in Stable 2024.02 onwards. In this article, I’ll explain the issue and show you how to resolve it so that you get the job results you need.

 

 

Unformatted Results

 

Previously, when you ran a job via a URL, you would get results that used standard SAS formatting. Consider the simple job:

 

proc print data=sashelp.class;
run;

 

 Which creates the following result:

  

treiman_format_01.png

Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.

 

However, in Stable 2024.02 onwards, you may have noticed that you are instead getting this result:

 

treiman_format_02.png

 

This is because of a change in the content security policy.

 

 

Update the Content Security Policy

 

To update the content security policy, you need to be logged in as an administrator. Then, you need to complete the following steps:

 

  1. Open SAS Environment Manager.
  2. Click the Configuration tab.

treiman_format_03.png

  1. Select SAS Job Execution from All services.

treiman_format_04.png

  1. Expand the jobexecapp configuration.
    treiman_format_05.png
  1. Click the edit button and modify the contentsecuritypolicy configuration policy to add 'unsafe-inline' to the style-src section, as follows:
    default-src 'none'; script-src 'self'; connect-src 'self'; img-src 'self';
    
    style-src 'self' 'unsafe-inline'; frame-ancestors 'self'; form-action 'self';
    

     

    treiman_format_06-1024x99.png
  1. Click Save.
  1. To make the change take effect, you need to restart the services. The simplest way to do this is simply to log out and log back in.

 

Once you have made these changes and logged back in, test the job again by running it via URL. You should now see normally formatted results:

  07_treiman_format_01.png

 

 

Conclusion

 

If your jobs stopped behaving the way you expect, you (or your administrator) may need to update your content security policy to allow SAS formatting to be displayed in job results. Stay tuned for more useful tips!

 

 

Find more articles from SAS Global Enablement and Learning here.

Version history
Last update:
‎03-14-2025 04:04 PM
Updated by:
Contributors

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

SAS AI and Machine Learning Courses

The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.

Get started

Article Tags