Siempre que hablamos de SAS Viya hablamos de CAS (Cloud Analytics Services), nuestro objetivo será presentar los cuatro comandos principales de CAS y algunas de sus opciones. Estos serán cas, caslib, proc cas y proc casutil. Comencemos con la instrucción: cas.
Puede realizar las siguientes tareas con la instrucción CAS:
La documentación completa se encuentra en el siguiente enlace: SAS Help Center: CAS Statement
Ejemplos:
Cas; /* inicie sesión cuando no ponga un nombre de sesión, será automáticamente
CASAUTO*/
Log:
80 cas;
NOTE: The session name identified with the SESSREF= SAS option is connected to Cloud Analytic Services. The default value for
SESSREF= is CASAUTO.
Cas mysession; /* en este caso llamamos a la sesión como 'mysession' */
Log:
80 cas minhasessao;
NOTE: The session mysession connected successfully to Cloud Analytic Services sas-cas-server-default-client using port 5570. The
UUID is 882cf53b-ffc6-cd4a-987f-ea0180fd2c21. The user is xxx.xxx@xxx.com and the active caslib is
CASUSER(xxx.xxx@xxx.com).
NOTE: The SAS option SESSREF was updated with the value mysession.
NOTE: The SAS macro _SESSREF_ was updated with the value mysession.
NOTE: The session is using 4 workers.
81
Cas mysession disconnect; /* desconectado de la sesión la sesión permanece disponible pero usted se desconectó de ella */
Log:
80 cas mysession disconnect;
NOTE: Request to DISCONNECT completed for session mysession.
Cas mysession terminate; /* la diferencia en 'terminar' es que incluso en el servidor cas no puede devolver la sesión abierta anteriormente. */
Log:
80 cas mysession terminate;
NOTE: Deletion of the session mysession was successful.
NOTE: The default CAS session mysession identified by SAS option SESSREF= was terminated. Use the OPTIONS statement to set the
SESSREF= option to an active session.
NOTE: Request to TERMINATE completed for session mysession.
Cas mysession reconnect; /* Te vuelves a conectar a la sesión que usó el comando de desconexión */
Log:
80 cas mysession reconnect;
NOTE: Request to RECONNECT completed for session mysession.
81
Cas _all_ list; /* Listar todas las sesiones activas */
Log:
NOTE: Session CASAUTO is ACTIVE using port 5570 and host sas-cas-server-default-client for user xxx.xxx@xxx.com. The
session UUID is 89714516-00b8-cc49-a92d-4dc3e530a95b.
NOTE: Session mysession is ACTIVE using port 5570 and host sas-cas-server-default-client for user xxx.xxx@xxx.com. The
session UUID is 8c85b7d7-0abd-d044-9900-1e18027ebaf4.
NOTE: Session LIST is ACTIVE using port 5570 and host sas-cas-server-default-client for user xxx.xxx@xxx.com. The session
UUID is d33e9a96-5966-d24c-9362-d9cf8a69febf.
Cas mysession listabout; /* Lista de propiedades de mysession */
Log:
cas mysession listabout;
Section: About
CAS = Cloud Analytic Services
Version = 4.00
VersionLong = V.04.00M0P09192022
Viya Release = 20221025.1666685267102
Viya Version = Stable 2022.09
Copyright = Copyright © 2014-2022 SAS Institute Inc. All Rights Reserved.
ServerTime = 2023-02-02T11:54:29Z
Section: System
Hostname = controller.sas-cas-server-default.ssemonthly.svc.cluster.local
OS Name = Linux
OS Family = LIN X64
OS Release = 5.4.0-1078-azure
OS Version = #81~18.04.1-Ubuntu SMP Mon Apr 25 23:16:13 UTC 2022
Model Number = x86_64
Linux Distribution = Red Hat Enterprise Linux release 8.6 (Ootpa)
Section: license
CASHostAccountRequired = OPTIONAL
Transferred = NO
CASCacheLocation = CAS Disk Cache
NOTE: Request to LISTABOUT completed for session mysession.
Dive into keynotes, announcements and breakthroughs on demand.
Explore Now →
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.