0% found this document useful (0 votes)
34 views7 pages

SAS Studio 01 Logging Into The System - 11.03

log systems

Uploaded by

Vinod Krishna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views7 pages

SAS Studio 01 Logging Into The System - 11.03

log systems

Uploaded by

Vinod Krishna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

SAS Studio Exercise 01

Logging Into the System

(11/22/2024)

Sources
Steve Nolan, Ron Freeze, Elizabeth Keiffer, Michael Gibbs, Jorge Moreda, Shubhashree Sahoo, Darby
Shade
Enterprise Systems, Sam M. Walton College of Business, University of Arkansas, Fayetteville
SAS® Studio. Release 5.2
SAS® VIYA® release V.03.05

Copyright © 2018 For educational uses only - adapted from sources with permission. No part of this
publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means,
electronic, mechanical, photocopying, or otherwise, without the prior written permission from the
author/presenter.
Use Case – Logging into the system
Razorback Stores is a local department store serving a metropolitan area. As a department store, they offer
a wide variety of items and services and track sales through a point of sale system. Over the past several
months, Razorback Stores performed a marketing campaign designed to promote and incentivize a loyalty
program.
Our first step in the process of analyzing and assisting Razorback Stores is signing into the VIYA system.
This will give us access to a wide variety of tools and methodologies we can use to analyze the data
provided.

Step 1: Signing into VIYA


1. Use the following link below to sign in: https://viya.walton.uark.edu/SASDrive
This link will take you to the main VIYA platform hosted by the University of
Arkansas.
Once you have clicked on the link,
2. Login with your University credentials
Once you have logged in,
you will be presented with
the main user interface
which is also called your
SAS Drive. From here, you
have access to the system.
Please note that your screen
may look slightly different
depending on the projects
and reports that you have
worked on.

Step 2: SAS Viya Actions


For this tutorial, we want you to be comfortable in navigating back and forth between two SAS Viya
Actions: Manage Data and Develop SAS Code.
In the top left of your current screen (SAS Drive screen or main user
interface screen),
3. Click on the three parallel horizontal lines to the left of SAS
Drive –Share and Collaborate
A drop-down menu will showcase the applications menu. Here you
can find the two actions of interest to us for this tutorial: Manage
Data and Develop SAS Code.

Step 3: Develop SAS Code


3

In this section you are given the code to


run in SAS Studio in order to provide
access to: 1) public folders, 2) personal
user folders and 3) team shared libraries.
When accessing Develop SAS Code you will be
taken to the main user interface for SAS Studio
which looks like the following:
Next, we need to activate a CAS session in order to access our data.
4. Click on Options in the top menu and,
5. Go to Autoexec file
You should then be presented with a code area.
6. Insert the following code in line 1:
LIBNAME pubcas CAS CASLIB=PUBLIC;
7. Press Enter in your keyboard
8. Insert the following code in line 2:
LIBNAME mycaslib CAS CASLIB=CASUSER;
9. Press Enter in your keyboard
10. Insert the following code in line 3:
cas mySession sessopts=(caslib=casuser timeout=1800
locale="en_US");
11. Insert the following code in lines 4 and 5:
cas;
caslib _all_ assign;
*NOTE: It is easiest to copy and paste these lines of code. Please
note the spaces in the second line of Step 11*
These are the codes to access the public folders (Line 1), your
personal user folder (Line 2), and libraries shared with you (Lines
3,4, and 5). Once you have the code in place,
12. Click the Run button at the top
A window of Autoexec File will appear
Click on Save
This code will stay in the Autoexec File and automatically run
every time you access SAS Studio by selecting Develop SAS
Code.
Once you have run and saved the code lines in the previous step, you should have access to the data that
is currently in-memory either in the PUBLIC folder or in your USER folder or in shared libraries. To
look at these folders do the following:
13. On the left-pane, click on Libraries
If you inserted the code lines above correctly, these folders should have the names PUBCAS and
MYCASLIB like in the picture alongside.
14. Expand these folders to see if there are any datasets in-memory
If you have datasets similar to the picture alongside, it means that you currently have datasets loaded into
memory in both the PUBLIC and your personal USER folders.
In case you DON’T HAVE ANY DATASETS in either of these two folders, follow Step 4a: Manage
Data below, else, proceed to Step 5: SAS Studio Tasks.

Step 4a: Manage Data


In order to load data sets into memory,
15. Click on the three parallel horizontal lines at the top left of your
current screen and,
16. Click on Manage Data
17. Click on the Data Sources tab
18. Click the right arrow to the left of cas-shared-default
You will then find several options to choose from. We are interested
in two in particular: CASUSER(username) and Public.
(These two represent the two libraries we talked about in Step 3:
Develop SAS Code.)
We will now showcase how to load data into memory from the Public library
into your CASUSER(username) library.
19. Click on the right arrow to the left of Public
Inside you will find all the datasets available in the Public environment. The
way to distinguish if they are in-memory or not is by the “Asterisk” sign next
to the table icon on each dataset.
20. Scroll down and click on any dataset you wish to load into memory, for
this example we will load CHURN_DIRTY dataset
Your right-pane will populate with information about the dataset selected.
At the top right corner,
21. Click on the “Add to import” icon
In the new window that appears,
22. Check Target location to ensure that
CASUSER(username) is selected
23. If not, click on the “library” icon
A new window titled Choose Target will appear.
24. Click CASUSER(username) to select it
It will show a light grey shadow.
25. Click OK
5

The Target Location should now show the path to your CASUSER(username) folder.
26. Click Import Item at the upper-right corner of the screen
A notification will appear stating that the table was successfully imported.
You can now return to SAS Studio by,
27. Clicking the three parallel horizontal lines at the top left of
your current screen, and
28. Selecting Develop SAS Code

Step 4b: Create Shared Libraries


To create shared libraries, follow the first 4 points in Step 4a then:
29. Click on the plug symbol just below the Filter section
A new window saying Connection Settings will pop up
30. Give a name to your library
WARNING: The library name cannot be longer than 8
characters and must not contain dashes
31. Check the Persist this connection beyond
the current session
32. The path name should be: /data/”your library name”/
For example, the library name is FREEZEGA and the
Path name is: /data/FREEZEGA/
33. Click Test Connection and it should say “The
connection was successful”
34. Click Save
You should now see the new library under cas-shared-
default
In order for your team members to see this library, you must give them
permission.
Giving Access to Team Members:
35. Right click on the library you created
36. Click Edit Authorization
An Edit Authorization window will appear
37. Click on the Person icon
at the top right of the
window
38. Click Add Identities
39. On Add Identities
window click the small
triangle under Filter by and then select Users
40. Search your team members using the filter option
41. Bring the team member to the
Selected Identities section by
double clicking or using the
plus sign and then Click OK
You will again come back to the
Edit Authorization window. In
order to give the right authorization
to your team members:
42. Move the circle under Access
Level to Read/ Write/ Full
Control based on the level of
access you are wanting to give.
43. Click Save

Step 5: SAS
Studio Tasks
We will select the
CHURN_DIRTY dataset
we loaded in the previous
step.
44. Expand the
MYCASLIB folder
45. Double-click on
CHURN_DIRTY
You will have a preview of this dataset in the working space to the right.
In order to double-check that your data was successfully loaded
into memory we want to showcase that you can find the data if you
decide to perform a task such as graphing a Bar Chart.
46. On the left-panel, click on Tasks
47. Expand the SAS Tasks folder
48. Expand the Visualize Data subfolder
49. Expand the Graph subfolder
50. Double-Click on Bar Chart
A new tab will open on the working space to the right.
51. Under DATA, click the folder icon
A new window will appear.
Under Libraries,
52. Click on MYCASLIB
and,
7

53. Click on CHURN_DIRTY


54. Click OK
A notification is still present in red that needs resolved.
So, next, under ROLES,
55. Click + (Select columns) to the right of Category:
A new window titled Column Selection will appear.
56. Click on State
57. Click OK
The code required to create this Bar Chart visual
is now populated in the code window.

58. Click Run


The

generated Bar Chart will appear on the right, under the Results tab.

You might also like