How to use the SAS® 9 Content Assessment Tool


Are you thinking about migrating your environment over to SAS® Viya® but don’t know whether your current architecture will be supported? Luckily, the SAS 9 Content Assessment Tool can help to alleviate some of those worries.

If you look at our documentation on the SAS 9 Content Assessment Tool, you’ll see that there is a fairly large amount of information to parse through. However, each section is designed to cover a different application within the SAS 9 Content Assessment Tool to help assist in your transition. Before diving in and running all the applications, first ask yourself a few questions:

  • What is your goal with using the SAS 9 Content Assessment Tool?
  • Are you simply wanting to count (inventory) what is in your environment?
  • Do you want a more detailed explanation (profile) about the items that exist in your deployment?
  • Are you wanting to know whether your current SAS code will transition (code check) correctly to SAS Viya?

These are all important questions to consider before choosing which application to run and for what purpose. In this post, I will show you an average use case for running the SAS 9 Content Assessment Tool and how to check whether an environment is ready for SAS Viya.

Download and unpack the tool

Before we can access SAS Content Assessment, we will first need to download and unpack the tool itself. The latest download available at the time of this article is version 2021.1.2 and can be downloaded from the SAS 9 Content Assessment 2021.1.3 support site.

We will be downloading the Linux version for our purposes:

You will then want to unpack the TAR file by using the Linux command below:

tar zxvf /SAS9ContentAssessment/SAS9ContentAssessment.2021.1.2.lax.tgz

The resulting unpacked files should produce the “assessment” and “migration” files:

Now that we have successfully unpacked the Content Assessment tool, we can proceed to modifying the setenv.yaml and files for configuration.

Set up the configuration

We’ll start by specifying specific configuration information that is necessary to run the Content Assessment tool successfully. Let’s modify the setenv.yaml file first:

We are required to set explicit values for each key-value pair that is denoted with an asterisk. However, both the SAS_CATALOGSDIR and ENTERPRISE_GUIDE_PROJECTSDIR need values specified only if you intend to gather this content. This means, for this example, we will be setting values for the following:


We have modified the file in our text editor of choice, Notepad++:

*There are no SAS® Enterprise Guide® projects to gather for this particular example so we will leave this field blank.

*Same for this one

After you set these values, you can save and close the file and proceed to editing

In this file, specific values must be defined for METADATAHOSTNAME and METADATAUSERPASSWORD. The values are written in italics, as shown above.

In this case, we will be specifying additional values to help distinguish which host machines we are running the Content Assessment Tool on:

After you set these values, you can save and close the file.

Task #1: Inventory Content

Now that we have filled in the required values for the configuration files, we can begin with running the applications within SAS Content Assessment Tool. We will first begin with running Inventory Content. In summary, Inventory Content performs the following:

  • It determines which licensed products are installed.
  • It examines the SAS Deployment Registry for various actions and items.
  • It enumerates all file system content.
  • It enumerates SAS metadata, such as the following:
    • SAS metadata objects contained in SAS folders
    • SAS server and SAS application server contexts
    • ACTs and ACEs

We will go ahead and run Inventory Content by navigating to our unpacked tool directory:

Then we will run the script:

[sas@trcv037 assessment]$ ./inventoryContent

Running the script should show multiple checks:

Now that Inventory Content has completed, it should have products three different data sets:

  • all_objects.sas7bdat
  • deploymentinfo.sas7bdat
  • licenseinfo.sas7bdat

We can confirm this by navigating to the path for inventory as defined in the setenv.yaml file: ASSESSMENT_DATAMARTDIR/inventory/METADATALABEL.

We have completed the Inventory Content task.

Task #2: Profile Content

Running the Profile Content application enables you to profile SAS objects and SAS content. To run the Profile Content application, you will need to navigate to the unpacked tool directory and issue the following command:


The process will look similar to what is shown here:

Note: If you are running a version of SAS earlier than SAS® 9.4M3 (TS1M3), you will need to run the Relationship Loader by adding the command option --load-relationships.

This step produces multiple SAS data sets in the output defined for ASSESSMENT_DATAMARTDIR/profile/METADATALABEL.

We have now completed the Profile Content task.

Task #3: Code Check

The goal of the Code Check application is to check you SAS code for incompatibilities with SAS Viya. During the process, Code Check performs the following actions:

  • It classifies any file in the starting directory and any subdirectories that have an extension of .SAS as SAS code. It adds each one to a list of files to be scanned.
  • It searches the files for keywords that have been identified as not compatible in SAS Viya.
  • It searches the files for hardcoded paths in statements such as LIBNAME, INFILE, FILENAME, %INC, and %INCLUDE. These occurrences might not cause errors, but they are gathered so that they can be validated.

When executing the codeCheck command, you will have a few options available to you. You can use the --scan-tag option to distinguish separate runs from Code Checks across different directories.

Then there’s the --source-location, which is required to target the directory in which you scan for code.

Finally, there’s the --sources-file option if you have several directories that you would like to scan all at once.

In our instance, we will simply point to one directory to gather our code and distinguish this run with a unique scan tag. We’ll run the following command:

./codeCheck --scan-tag exampleGather --source-location /home/sas/My_SAS_Files

You can see that we are targeting the directory: /home/sas/My_SAS_Files. This directory contains five example programs to check:

After executing the command, you should see the following generated from the script:

And two data sets are created for each scan tag in the Code Check datamart:

  • scan-tag_elements.sas7bdat
  • scan-tag_issues.sas7bdat

We have now completed our run of the Code Check application.

Task #4: Publish Assessed Content

Now that we have finished running Inventory, Profile, and Code Check, we can now choose to publish and merge our content so that we can view the results in a more readable format. If Inventory, Profile or Code Check has been run on more than one machine, we would need to aggregate all the resulting data sets to one location and run publishAssessedContent on that directory. However, in our instance, we generated the results on only one machine, so this is not necessary.

When running the publishAssessedContent command, you need to specify which datamart type you are targeting. For example, for Code Check, we would specify the Code Check datamart type:

./publishAssessedContent --datamart-type codecheck

The datamart-type value would change for Inventory and Profile.

When executing the publishAssessedContent command, the result looks like this:

You can see that publishAssessedContent found the resulting data sets generated from Code Check and merged and published them to the respective datamart.

If we go to that datamart location, we can see that some additional datasets were generated:

  • codechk_elements.sas7bdat
  • codechk_issues.sas7bdat
  • codechk_keywords.sas7bdat
  • elements_aggregated.sas7bdat

Once you have the data sets generated in this manner, you can choose to import them by following the steps in Importing the Data Mart.

You can also choose to encrypt your result using the --encryption option. You can specify either of these options:



When using this method, an file is created in the location the tool was unpacked.

If you are coordinating with your SAS success team to plan a roadmap to SAS Viya, you will likely be asked to provide these datamarts. To do so, you will need to run the --create-uploads option with the original command. For example:

$ ./SAS9ContentAssessment/assessment/publishAssessedContent --create-uploads

--datamart-type profile --encrypt-aes

The result is the creation of three upload files, with the following file-name formats:

• customer-name_data-mart-type_short-host-name_reports.tgz

These can be delivered to your SAS success team by following the steps in our documentation.

Related Resources



About Author

Ben Yarbrough

Associate Technical Support Engineer

Hello all! My name is Ben Yarbrough and I've worked with SAS in my Technical Support Engineering role for a little over three years now. I help support customers facing licensing and deployment issues on both Windows and Linux and have more recently started supporting our newer offering, the SAS Content Assessment Tool. I'm excited to share my knowledge in these areas and supplement our customers to achieve their goals.

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to Top