BookmarkSubscribeRSS Feed

SAS Viya 2021.2 – Migrating SAS Data Integration (DI) Studio Jobs to SAS Studio Flows

Started ‎11-15-2021 by
Modified ‎11-15-2021 by
Views 7,582

The SAS Viya 2021.2 (November 2021) Long Term Support (LTS) release provides a means for SAS Data Integration (DI) Studio users to migrate their jobs to SAS Viya by creating SAS Studio Flows.


Currently, the code in SAS DI Studio jobs is converted to SAS Program nodes in SAS Studio Flows.  In future releases the code will be mapped to specific SAS Studio Flow nodes where appropriate such as Query, Filter Rows and Sort as is done now for SAS Enterprise Guide (EG) projects.


There is a content assessment to help support you SAS Viya content migration.  Refer to this article for more information.


Migrate SAS Data Integration (DI) Jobs

This is the DI Studio job I want to migrate to SAS Viya.




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


The first step is to create an export package based on this job.




When creating the export package, select the option to Include dependent objects when retrieving initial collection of objects.




Once the export package is created, you may need to copy or FTP it to a location accessible by your SAS Viya installation.  In SAS Viya, access the Import page in SAS Environment Manager.




Select  1_icon_file.png to navigate to the SAS package file.  Select to import only the DI Studio job(s).  The library and tables won't import and there will be errors.




On the Mapping tab, select  1_icon_file.png to navigate to the location to save the converted SAS Studio Flow file(s).




Note:  There is no need to map the tables since they are not being imported.  


Select the Preview tab to confirm the contents to be imported, then select Import.




Confirm the import completed on the Results tab.




Now, the resulting flow file(s) can be opened in SAS Studio.




When you first open the flow, there is a message that "The flow contains migration errors".  If you hover over the error indicator on the Job pre-code node, the error is displayed.




In my case, the migration error is that the library difttgt is required for this job to run successfully.  All the code from the DI Studio job has been converted to SAS Program nodes and a Job pre-code and Job post-code nodes are created and put into swimlanes in the appropriate execution order.   In future releases, code will be converted to more specific nodes instead of just the SAS Program as has already started happening for EG Project migrations.  


Also, be aware that the SAS Program nodes use hard-coded table names.  It is a copy of the code from the DI Studio job; therefore, it does not use the macro variables that represent the tables connected on the input/output port of the SAS Program node.  You may want to take advantage of this feature in SAS Studio Flows.  If so, for more information refer to the Using Macro Variables to Reference Input and Output Ports topic in the documentation.  


To clear the error message, I can uncomment the LIBNAME statement in the Splitter node of my flow and correct it to fit my Viya installation.  In my case, I would need to adjust the path for the SAS Data Sets in the flow.




Another way to clear the error message is to create the SAS Library on the Libraries tab of SAS Studio.  This is the option I am going to do.  Since the library I need to create is for BASE SAS, I need to confirm on the Explorer tab, the location on the SAS Server where the data sets reside.  Note:  You may need to upload or migrate your data to be accessible to your Viya installation.




On the Libraries tab, I create the SAS library pointing to the location.




I can now close the error message and click the Job pre-code node to make the error indicator disappear.  I save and run the job.  The Job pre-code node completes successfully, but there is an error on the Splitter node.




I review the Log and find out the error is due to a missing format for ORDER_TYPE.




To clear this error, I can import my custom formats into my SAS Viya installation.  Refer to this article on how to do this.  Another option is to add the format into the code of my flow.  I am going to do that and add the proc format statement using a SAS Program node that I connect to the Job pre-code node.




I save and re-run the flow.  This time it completes successfully.




I navigate to the DIFTTGT SAS Library and confirm my output tables were created.



I have now confirmed that I successfully migrated my DI Studio job!    



Users of SAS DI Studio can now begin migrating to SAS Studio in SAS Viya.  The jobs are converted to SAS Studio Flows, but keep in mind you also need to migrate any needed source data, create libraries, and migrate custom formats as well as any other supporting items for the job.  


For more information review the topic Transitioning to SAS Studio in SAS Viya in the documentation. 


Find more articles from SAS Global Enablement and Learning here.

Version history
Last update:
‎11-15-2021 02:53 PM
Updated by:



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags