BookmarkSubscribeRSS Feed
acordes
Rhodochrosite | Level 12

We have an user interface through DDC in Visual Analytics that captures the user's choice into parameters, processes them, adds logic and sends them via the append method to the sas code job. 

 

The code executes well but overall the job takes 15 seconds to complete. 

 

I have the suspicion that what consumes so much time is to lift the session and assign the caslibs, I assign all of them but I only need 2 for the code to run. The sas code once the session is created, takes less than a second to run as it is not resource heaevy what the code is doing. 

 

Can I use the autoexec file for keeping the session alive, @pathew ? I ask you directly because you solved a similar issue this week for me. Thanks in advance. 

 

Here is how the called sas code for execution initiates the session right now, the relevant part:

 

%put NOTE: Local   = %sysfunc(putn(&dt_local, datetime20.));
%put NOTE: UTC= %sysfunc(putn(&dt,       datetime20.));

/* %let local_vs_utc=%sysfunc(intck('dthours', &dt_local, &dt)); */
%let user_q    = %str(%')&SYSUSERID%str(%'); 
%let uuid_q    = %str(%')&row_id%str(%'); 
%let castbl=OUTPUT_EQUIPMENT_SRT_DEN;
%let caslib=pims;  

%global skip_job lockstate;
%let skip_job=0;        /* IMPORTANT: init so open-code %if is stable */
%let lockstate=ACCESSIBLE;

cas mySession sessopts=(caslib=casuser timeout=1800 locale="en_US");

caslib _all_ assign;


cas mySession sessopts=(caslib="&caslib");
libname mycas cas caslib="&caslib";

 

 

 

pic.png

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 0 replies
  • 52 views
  • 0 likes
  • 1 in conversation