BookmarkSubscribeRSS Feed
madhuramalkar
Calcite | Level 5

Hi All,

 

We have just migrated from SAS 9.4 environment to SAS Viya environment. Both the environments are running on Linux servers.

In SAS 9.4 we had created SAS EG projects for data preparation and upload to LASR task was also included in same. These projects were scheduled for daily pulls. After migrating to SAS Viya we are able to run all the codes in SASStudio environment and also in SPRE.

I have 2 questions here:

1. I tried putting upload to CAS snippet in the .sas code and tried running from SPRE but that fails with following error:

code : cas mySession2 sessopts=(caslib=casuser timeout=1800 locale="en_US");
ERROR: The request to start or connect to a session failed. Specify a UUID to connect to an existing session or specify a session
name, port and host name to start a session.

NOTE: Kerberos authentication failure in function gss_init_sec_context: Unspecified GSS failure. Minor code may provide more
information.
NOTE: Additional information: No Kerberos credentials available (default cache: KEYRING:persistent:0).
ERROR: Kerberos initialization failed. Your credential cache is either expired or missing.
options cashost="apsasvamaster.asianpaints.com" casport=5570 sessref="mySession2";
cas;
ERROR: Kerberos initialization failed. Your credential cache is either expired or missing.
ERROR: Unable to connect to Cloud Analytic Services apsasvamaster.asianpaints.com on port 5570. Verify connection parameters and
retry.
NOTE: Kerberos authentication failure in function gss_init_sec_context: Unspecified GSS failure. Minor code may provide more
information.
NOTE: Additional information: No Kerberos credentials available (default cache: KEYRING:persistent:0).
ERROR: Kerberos initialization failed. Your credential cache is either expired or missing.

code: cas mySession2 sessopts=(caslib=casuser timeout=1800 locale="en_US");
ERROR: Kerberos initialization failed. Your credential cache is either expired or missing.
ERROR: Unable to connect to Cloud Analytic Services apsasvamaster.asianpaints.com on port 5570. Verify connection parameters and
retry.
code: proc casutil;
ERROR: A connection to the Cloud Analytic Services session could not be made.
ERROR: An error has occurred.
code: droptable casdata="SSC_SLA_PERFORMANCE" incaslib="ssc" quiet;
ERROR: An error has occurred.
code: run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE CASUTIL used (Total process time):
real time 0.04 seconds
cpu time 0.05 seconds

 

How to connect to CAS server from SPRE?

 

2. Is there any other way to schedule .sas program to run automatically other than running it in SPRE and scheduling it in crontab?

1 REPLY 1
nfarinha
Fluorite | Level 6

Hi, any luck?

 

To do this, I've created the .authinfo at the home of the user "sas" (eg).

Now on the code.sas add the cas session:

cas batchsess authinfo="/home/sas/.authinfo" host="cascontroler.fqdn.com" port=5570 sessopts=(caslib=casuser);

 

Remember, user sas is on the Linux servers and on the LDAP, then you can try this on the SASStudio first

 

call it with user sas:

/opt/sas/spre/home/SASFoundation/sas code.sas

OR using the batchserver (do this)

/opt/sas/viya/config/etc/batchserver/default/batchserver.sh

 

Using the batchserver you don't need to set the cas host and port, also you can configure the autoexec, sasv9, sasenv_, etc on the batchserver folder

 

The .authinfo contains the following (https://documentation.sas.com/api/docsets/authinfo/9.4/content/authinfo.pdf?locale=en😞

default user sas password {sas004}xxxxxx

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 3080 views
  • 1 like
  • 2 in conversation