You are not authorized to execute programs written in external languages when using SAS LIBNAMEs


An issue occurs where you are not authorized to execute programs that are written in external languages when using SAS LIBNAMEs.

For example, submitting the example code from Calculate the Moving Average of the Airline Series works fine in SAS® Studio. However, if you change the library from CAS to a traditional SAS LIBNAME like WORK, SASUSER, and so on, the following error occurs in the traditional SAS® MultiVendor Architecture™:

ERROR: User ‘xyz' is not authorized to execute programs written in external languages either because the user doesn't own the
current process or because the current process is running under a privileged OS account.
ERROR: Unable to parse user-defined program.

User is not authorized to execute programs written in external languages.

Cause

When the input library is a CAS library, the entire process runs entirely in CAS. However, when the input library is a SAS data set (like WORK, SASUSER, and so on), the process is not located entirely in CAS. SAS MultiVendor Architecture sends a job to CAS to run. That is, the CAS process is not initiated by the user; the CAS process is initiated by SAS MultiVendor Architecture. 

Workaround

Load data into CAS before submitting code that involves EXTLANG. Do not involve the traditional SAS library in the TSMODEL when using EXTLANG.

Here is an example:

Using the example code from Calculate the Moving Average of the Airline Series, ensure that everything is executed in CAS by loading the data into CAS before you run the code.

sample code

sample code