BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
acordes
Rhodochrosite | Level 12
I'm still with the Trial Version of Viya.
When running job execute it complaints about unknown caslib although the same code works well in sas studio.
How can I access libs from job execute?
1 ACCEPTED SOLUTION

Accepted Solutions
alexal
SAS Employee

@acordes ,

I think I don't have the options "run as".

You have to go to the Jobs menu and schedule that job.

 

https://pdcesx19027.sas.com/SASEnvironmentManager/jobs

 

 

schedule_a_job.png

but how do I retrieve the cashost name?

Check your inventory file if you do not know where the CAS server has been installed.

View solution in original post

7 REPLIES 7
alexal
SAS Employee

@acordes ,


I would like to review the SAS log as well as the CAS server log covering the time when you ran that job. 

acordes
Rhodochrosite | Level 12

I don't know how to access the log from JobExecute.

 

the code executed in SAS Studio but failed in JobExecute is the following:

 

the job error that pops up says that libref casuser is not assigned.

 

the log from sas studio is:

 

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
NOTE: ODS statements in the SAS Studio environment may disable some output features.
76
77 /*****************************************************************************/
78 /* Create a default CAS session and create SAS librefs for existing caslibs */
79 /* so that they are visible in the SAS Studio Libraries tree. */
80 /*****************************************************************************/
81
82 cas;
NOTE: The session name identified with the SESSREF= SAS option is connected to Cloud Analytic Services. The default value for
SESSREF= is CASAUTO.
83 caslib _all_ assign;
NOTE: A SAS Library associated with a caslib can only reference library member names that conform to SAS Library naming conventions.
NOTE: CASLIB CASUSER XXXXXXXX for session CASAUTO will be mapped to SAS Library CASUSER.
NOTE: CASLIB Formats for session CASAUTO will be mapped to SAS Library FORMATS.
NOTE: CASLIB ModelPerformanceData for session CASAUTO will not be mapped to SAS Library ModelPerformanceData. The CASLIB name is
not valid for use as a libref.
NOTE: CASLIB Models for session CASAUTO will be mapped to SAS Library MODELS.
NOTE: CASLIB Public for session CASAUTO will be mapped to SAS Library PUBLIC.
NOTE: CASLIB QASMartStore for session CASAUTO will not be mapped to SAS Library QASMartStore. The CASLIB name is not valid for use
as a libref.
NOTE: CASLIB Samples for session CASAUTO will be mapped to SAS Library SAMPLES.
84
85 ods graphics on;
86
87 proc freq data=sashelp.class;
88 table sex*age/ plots=mosaicplot out=casuser.frek;
89 run;
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set CASUSER.FREK has 11 observations and 4 variables.
NOTE: The PROCEDURE FREQ printed page 2.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.36 seconds
cpu time 0.16 seconds

 

 

cas; 
caslib _all_ assign;

ods graphics on;

proc freq data=sashelp.class;
table sex*age/ plots=mosaicplot out=casuser.frek;
run;

 

alexal
SAS Employee

@acordes ,

 

When you created a schedule for your job, what user did you specify in "Run as"? Also, I wasn't able to start a job in SAS Job Execution that connects to the CAS server without specifying CASHOST and CASPORT as shown below:

 

options cashost="<FQDN_OF_YOUR_CAS_SERVER>" casport=5570;
cas; 
acordes
Rhodochrosite | Level 12
I think we're getting closer.

Under
https://pdcesx19027.sas.com/SASJobExecution/
I think I don't have the options "run as".

And excuse my ignorance, but how do I retrieve the cashost name?
alexal
SAS Employee

@acordes ,

I think I don't have the options "run as".

You have to go to the Jobs menu and schedule that job.

 

https://pdcesx19027.sas.com/SASEnvironmentManager/jobs

 

 

schedule_a_job.png

but how do I retrieve the cashost name?

Check your inventory file if you do not know where the CAS server has been installed.

acordes
Rhodochrosite | Level 12
perhaps this error message shows the way

{"errorCode":403,"message":"Invalid CSRF Token 'd5aeca9d-9a8f-406b-905b-057157ed3bf0' was found on the request parameter '_csrf' or header 'X-CSRF-TOKEN'.","details":["path: /SASJobExecution/"],"links":[],"version":2,"httpStatusCode":403}
acordes
Rhodochrosite | Level 12

that worked for me, thank you very much

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Discussion stats
  • 7 replies
  • 3040 views
  • 1 like
  • 2 in conversation