Vous êtes sur la page 1sur 20

ACG SAS Replatform - The Highlights!

• ACG has a new SAS server that will be accessible from laptops via Putty – see
SAS Server – however Putty must be upgraded to version 0.6 or later. In
addition, WinSCP must be at least version 5.13.14. If you need your software
upgraded, please file a support ticket.

• The new SAS server will have the same filesystems, so files will be in the same
relative locations e.g. /acg9/ or /acg4/. There will be some additional ones added
as well. Files will inherit the same access permission as on the previous server,
but will be set to a common owner (e.g. all files on shared areas may have an
owner of ‘root’; all files within the ‘/CLIENT1’ area that belong to the Client1 team
will be owned by a select person from the team). This should not affect access,
editing permissions, etc.

• Xming or Hummingbird eXceed will need to be replaced by MobaXTerm – see


Using MobaXTerm

• Xen desktops, a type of virtual remote desktop, are available for all users – see
Requesting a Xen desktop

• SAS EG and SAS EM will be available via Xen desktop only; SAS Studio, a
browser-based PC SAS-like environment, will be available via laptops and via
Xen desktop See the various sections in this document on these applications.

• Oak will continue to be available as a shared drive from both laptops and Xen
desktops. Onedrive is also accessible from Xen desktops – syncing can be
setup there just as with your laptop.

• Our STS project team at migration is from EBR ; access problems and other
issues may take until overnight for resolution if we need their help.

Private & Confidential

1
epsilon.com
Contents
Document Purpose ............................................................................................................. 3
Intended Audience.............................................................................................................. 3
Questions ............................................................................................................................ 3
Environment Description .................................................................................................... 4
Hardware ......................................................................................................................... 4
Software .......................................................................................................................... 4
Accessing the environment ................................................................................................ 4
SAS Server ..................................................................................................................... 4
Sending email via SAS ................................................................................................... 5
Requesting a Xen desktop ............................................................................................. 5
Using SAS Enterprise Guide (SAS EG) ......................................................................... 7
Using SAS Studio ......................................................................................................... 10
Using MobaXTerm ........................................................................................................ 10
Using SAS Enterprise Miner (SAS EM) ....................................................................... 11
Sypder (Python GUI interface) ..................................................................................... 12
Introduction to Unix/Linux ................................................................................................. 13
Accessing the SAS server ............................................................................................ 13
SAS libname for Unix .................................................................................................... 16
Business Processes ......................................................................................................... 16
Adding a new user ........................................................................................................ 16
Terminating a user ........................................................................................................ 16
Adding a new client ....................................................................................................... 17
Adding connectivity to a new database, server, etc. ................................................... 17
Frequently Asked Questions (FAQ) ................................................................................. 17
Creating a New Issue on the Sharepoint Site.................................................................. 19 Private & Confidential

2
epsilon.com
Document Purpose
The purpose of this document is to assist users in the migration of UMAARESSASP01
and Digisas to the new analytic environment.

This document will not cover the new ACG sandbox or production cloud environments.
In addition, it will not cover software usage or programming; it will only cover how to
access selected software such as SAS EG and SAS Studio.

Please send suggested edits to this document to Jon Hayward and Chris Chiambalero.

Intended Audience
This document is intended primarily as a guide for the ACG team, but can be used by
STS and other Epsilon associates as required.

This document is NOT intended to be shared outside of Epsilon at any time, in part or in
whole.

Questions
See email for list of contacts. In addition, you can add an item to our Issue Tracking list
at the below link by clicking on “+ New”

https://epsilon.sharepoint.com/teams/SASReplatform201804/Lists/SASReplatformIssue
Tracking/AllItems.aspx

Private & Confidential

3
epsilon.com
Environment Description
Hardware
Please see Appendix 1: Environment Diagram

The new environment has the following main parts:


1) SAS Server – this is similar to UMAARESSASP01. It is a Red Hat Enterprise
Linux (RHEL) server. Users can access it via Putty or MobaXTerm, for example,
and run SAS programs. It has over 100TB of disk space attached and is
extensible. Users are set up with the bash shell by default, but users can change
this.
2) SAS Metadata and Midtier servers – users don’t typically access these directly,
they are part of the SAS configuration. The SAS metadata server is used in SAS
Enterprise Guide (SAS EG) profiles, for example.
3) Open Source Server – this is a RHEL server where Python and other open
source tools can be installed and tested.

Xen desktops are available to all ACG users. Xen desktops are a type of virtual remote
desktop accessed via Web browser. They will allow for use of SAS EG, SAS EM, and
other applications. They can be accessed while connected to the corporate network or
while not connected to the corporate network.

This guide will not cover the cloud environment. That is covered by the Cloud
Onboarding document.

Software
SAS 9.4 is the current version of SAS on the SAS server as of December 2018. This
can be accessed via batch SAS at the command line, SAS EG, or SAS Studio (a PC
SAS like environment that is accessed via Web browser)

SAS EG and SAS EM are available by request to be installed on Xen desktops, not on
personal laptops.

The Open Source Server has Python installed. The open source server is
pc1ustsxapp01.red.prod.global

Accessing the environment


SAS Server
The SAS server can be accessed by Putty or MobaXterm from laptops or from a Xen
desktop. Putty must be version 0.6 or later.

Server name is pc1ustsxsas01.res.prod.global


Private & Confidential

4
epsilon.com
SAS can be called by using this command:

/sasapp/SASHome/SASFoundation/9.4/sas

Custom aliases in a user’s .bashrc file in the home directory can be set up similarly to
SASP01. Using “nohup” at the beginning will prevent your SAS programs from being
killed if they run for a long time or the window with the command line is closed. Using
the ampersand (&) means the SAS program will run in the background. So, to run a
program fully in batch in the background, type something like this:

nohup /sasapp/SASHome/SASFoundation/9.4/sas PROGRAMNAME.SAS &

Sending email via SAS

Here are some examples of how to send email from SAS.

/* sending an email with an attachment */


FileName SENDMAIL Email "NUL";
data _null_;
file sendmail to = ('YOUREMAILADRESS')
subject = "Report"
attach=("/home/krothman/test.xlsx"
/* the next line is only necessary if sending an excel file */
/* for other types of files, you can omit this option and */
/* and just close the parens */
content_type="application/xlsx");

run;

/* sending output in the email body */

filename mymail email to=('YOUREMAILADDRESS') TYPE='TEXT/HTML'


subject="test email result 2";

ods html body=mymail rs=none ;

proc print data=temp(obs=10);


run;

proc reg data=temp;


model a=cb c b ;
run;

ods html close;

Requesting a Xen desktop


Private & Confidential

To initiate a request to create a Xen desktop, please file a STS support ticket.

5
epsilon.com
Ticket type is under Hardware > Computers > XenDesktop/VDI

Ticket options/information:
Xen Desktop type = Developer
Leave checkboxes blank
Under the box for “Please specify any additional software” -> Please enter the following
(bolding is for emphasis here ; it’s not necessary in the actual ticket):
“Please set up the Xen in the Lewisville data center. I need the 64-bit SAS 9.4
clients installed. Please also install the MobaXTerm free version. Please add
me to the security group that will allow me to map the network drive
\\oak.corp.epsilon.com\ares on the Xen desktop.”

You will be emailed with the URL for accessing your Xen desktop via your browser.
You will use your CORP credentials for accessing it.

You can close your Xen window and it will stay active. You can log back in at another
time and the desktop will appear again as you left it.

If you are finished using the Xen, you should use “Sign Out” when you are done:
1) Click on the Windows icon on the lower left of the Xen window (not your laptop)
2) Click on the circle with the person icon in it and choose Sign Out
a. Best practice is not to use "Shut Down”

Private & Confidential

6
epsilon.com
Using SAS Enterprise Guide (SAS EG)
SAS EG allows for using SAS via writing and executing code or using menu-driven
GUIs.

Directions here are for initial setup:

1. Go to the Windows Menu and select SAS Enterprise Guide. If you have the 32-
bit version, please file a ticket and ask for the 64-bit version to be installed.

2. Click Yes at the below prompt. If a popup appears about a new version of SAS
EG, click “Skip this version”.

3. Click Add
Private & Confidential

7
epsilon.com
4. Fill in the information below and click Save. You can fill in anything for Name
and Description. It is recommended to leave the user and password blank. The
server name to put in the machine box is pc1ustsxmtd01.res.prod.global and port
is 8561.

5. Choose the profile just set up and click Set Active

6. At the prompt, enter your corporate credentials.


Private & Confidential

8
epsilon.com
This will allow you into SAS EG to write programs, etc. SAS will actually run on the
main SAS server pc1ustsxsas01.res.prod.global - datasets created or accessed in
these SAS programs should be saved there. Libnames declared in SAS code will point
to that server as well.

When you open SAS EG in the future, you can just follow steps 5-6. If messages about
new versions of SAS EG appear, always click “skip this version”.

When you have output from SAS EG you want to put into Excel, an easy way to do this
is by using the “Send to Excel” functionality. To do this, see instructions and screenshot
below:
1) Run a SAS program in SAS EG that produces output – e.g. a program that has a
PROC CONTENTS or PROC PRINT
2) Go to the Results tab
3) Click on Send To
4) Click on Excel

If you see any messages about updates, click “Skip this version”. Your results will be
moved into an Excel worksheet.

A separate guide to using SAS EG, including a guide to the interface and many
suggestions about how to use it, is available here:

https://epsilon.sharepoint.com/:p:/r/sites/StrategyAndInsights/Training%20Materials/Env
Private & Confidential

ironment%20Migration%202019/SAS%20Enterprise%20Guide.pptx?d=wb6604e34ab76
4ea497fd85871751b770&csf=1&e=nL6PKG

9
epsilon.com
Using SAS Studio

SAS Studio is a PC SAS like environment for using SAS. It runs in a Web browser.
Enter this URL into your Web browser to access SAS Studio:

http://pc1ustsxsas03.res.prod.global:7980/SASStudio

When prompted, enter your CORP credentials.

SAS programs can be saved to any directory on pc1ustsxsas01. In addition, libnames


created in code or files referenced will point to that server.

A separate guide to using SAS studio, including how to submit long-running jobs to run
in the background or on the Xen, is available here

https://epsilon.sharepoint.com/:w:/r/sites/StrategyAndInsights/Training%20Materials/Env
ironment%20Migration%202019/SAS%20Studio.docx?d=w90ed6663af68464997a77f99
c166557f&csf=1&e=aeI648

Using MobaXTerm

MobaXTerm can be used to access servers via command line, like Putty, or to launch
Xwindows applications like nedit. It also has SFTP functionality, like Core FTP or
WinSCP.

1. Launch MobaXTerm from your laptop or Xen desktop

2. Click on the “Session” icon to launch the “Session settings” window

Private & Confidential

10
epsilon.com
3. Click on the “SSH” icon.

4. Enter name of box to connect to in the “Remote host box” -


pc1ustsxsas01.res.prod.global ; then check the box next to “Specify username”
and enter your CORP username ; Click OK to launch session. It is not
recommended to save your password in your profile.

If you get a window about saving your password, it is recommended to click No. You
should now get a new session screen. In addition, when you log into a server, a
graphical SFTP bar appears on the left side. It allows you to exchange files between the
remote server and your computer (or the Xen desktop, if you’ve logged in from there).

Using SAS Enterprise Miner (SAS EM)


Private & Confidential

SAS EM is a menu-driven program for creating modeling process flows.

11
epsilon.com
If you have used SAS EM previously, here is a guide to migrating your projects to this
new version and server:
https://epsilon-
my.sharepoint.com/:w:/p/jon_casciari/ETNheFwHN_JDghZQO7KHOWABhzAcM0S0m
CKd3drbN0nNdg?e=rVwLjX

Sypder (Python GUI interface)

To use follow these steps.

1. Launch MobaXterm
2. Open a Unix session to pc1ustsxsas01.res.prod.global
3. Type “spyder“ at the command prompt (no quotes)
4. After a minute, you will see the below

Private & Confidential

12
epsilon.com
Introduction to Unix/Linux
Accessing the SAS server
The SAS server can be accessed by Putty or MobaXterm from laptops or from a Xen
desktop. Instructions for using MobaXTerm are above. To use Putty:

1) Launch Putty to open the Putty profile window


2) Ensure that you have version 0.6 or later installed – click the About button in the
profile window to see the version. If you have a version earlier than 0.6, file a
support ticket to get it upgraded.
3) Enter the server name and port as below. Ensure SSH is selected as the
Connection type.
4) Click Open at the bottom of the profile window
5) Enter your CORP credentials at the prompt. Note that the cursor may not move
as you type.

Server name is pc1ustsxsas01.res.prod.global


Private & Confidential

13
epsilon.com
You will get a message like the below the first time you connect – choose Yes:

The window will look like the below when you are successfully connected.

You will initially be placed in your home directory (/home/cchiambalero for example).
This is a very small area and is only for configuration files and very small files. You
should save most of your work, such as SAS programs, SAS datasets, input text files,
etc. on one of the shared areas like /acg5/ or /acg6/. You can create a subdirectory
there for yourself, a client, etc.
Private & Confidential

14
epsilon.com
From there, you can change to other directories, copy files, move files, etc. by typing
commands at the command prompt. A brief list of common Unix commands is below –
there are many more commands and examples available at a variety of online sites:

Command Action / Description


cd directory Change to the specified directory
Chmod Changes the permissions on files. See the
manual for syntax.
compress [uncompress] filename Various methods to compress and decompress
gzip [gunzip] filename files
zip [unzip] filename
Clear Clears the screen
ctrl+c Terminates the current command
ctrl+z Puts the current command in the background.
Use “fg” to return it to the foreground and “bg” to
put it back to the background.
df -BG /partition1 /partition2 Shows the space used and available (in GB) for
1+ partitions
du -BG /directory1/* Shows the space used (by subfolder) in GB. Use
du -BM for Megabytes
kill pid Terminates the PID (process ID) identified by the
“ps” command
ls Directory listing
ls –al Directory listing with details and hidden files
man command Displays the man(ual) page for most commands
mkdir directory Creates a new directory
more filename Displays file. Use spacebar to advance, “u” to
back up, and ctrl-c to exit.
mv filename1 filename2 Renames a file from filename1 to filename2
mv filename1 location Moves a file (or directory) from source to
destination
nedit filename With Exceed running, opens up the nedit GUI
text editor
ps -aef | grep username Shows a detailed listing of user’s current
processes
rm -r directory Deletes a directory and all of its contents
(permanently)
rm filename Deletes a file (permanently)

To run a SAS program:


1) Create a SAS program file. Always name it something like “program.sas” with a
Private & Confidential

.sas extension. You have a few options for doing this:

15
epsilon.com
a. You can create it as a text file on your laptop/Xen and upload via WinSCP,
for example
b. You can use a program with remote m connection capabilities, like
EditPlus, and connect directly to the SAS server to edit in place
c. You can use a program like vi, nedit, or emacs to edit the file in place
d. You can use SAS Display Manager, SAS Studio or SAS Enterprise Guide
2) Run the SAS program
a. You can do this via batch SAS at the command line by typing the above
command
b. You can run the program via SAS Display Manager, SAS Studio, or SAS
Enterprise Guide

If you run the program in batch, a log file and an output file (if there is any output) will be
created in the directory where you typed the SAS command. They will have the same
name as the original program file, but with a .log and .lst extension respectively. You
can view these files in a variety of ways (e.g. using the unix “more” command ; use nedit
or emacs ; download to your laptop/Xen and open with Notepad).

SAS libname for Unix

A sample SAS libname for data residing in /acg3/sample_client would be:

libname samp 'acg3/sample_client';

This is case sensitive and is the same for SAS EG, SAS Studio, and batch SAS.

Moving data from UMAARESSASP01 to New SAS Server

There is a guide with detailed directions on how to move data from the old SAS server
to the new one. It is located here:

SFTP Command Line Guide

Business Processes
Adding a new user

Please create an issue on the SharePoint site below. Please include the user’s CORP
ID, email address, and any client-specific filesystems s/he should have access to.
Private & Confidential

Terminating a user

16
epsilon.com
If you or someone on your team is leaving, please create an issue on the SharePoint
site below AS SOON AS POSSIBLE. It is easier to ensure continuous access to his/her
files if steps are taken prior to the date of separation.

Adding a new client

If you have a new client, please create an issue on the SharePoint site. If you do not
require connectivity to be created to databases or other servers and you plan to use a
shared area (e.g. /acg9), nothing may be required. Most new clients require at least
some connectivity to be created, at a minimum, and clients that require a new dedicated
filesystem and permission group etc. can take some time to set up.

Adding connectivity to a new database, server, etc.

If you need connectivity to a new database for an existing client, please create an issue
on the SharePoint site below. Include as much information as possible, including: client
name, ACG contact, delivery contact, server name, server IP address, database name
(if applicable), and any other details you know we will need. Your request will be
reviewed and you will be contacted if other information is required.

This process is lengthy. Before agreeing to any SLAs or due dates, contact
Satish Hariharan and Jon Hayward to determine when connectivity can be
established. It can take weeks for this process to be complete.

Plus, if connectivity is required to UAT or development servers, connectivity can take


several weeks or longer – we will need to gather specific information about
requirements, then submit this information to be approved by Info Security, and then
finally request a networking change.

Frequently Asked Questions (FAQ)


What will happen to SAS EG or SAS EM installed They will not be disabled
on my laptop? automatically, but they will not
be able to connect to the new
server.
Can I still use Xming from my laptop? Yes. Xming will continue to
work for accessing the
command line and tools like
nedit or emacs. Xming does
not work well with SAS9.4 –
Private & Confidential

so, users who use SAS Display


Manager users will need to file

17
epsilon.com
a support ticket to get the
software MobaXTerm (free
version) installed on laptops.
Why should I use the Xen desktop? Users are only required to use
them for SAS EM and SAS
EG. Users who use SAS
Studio and have long running
programs, for example, may
also find it useful to launch
SAS Studio from the Xen so
that it will continue running
overnight or when a laptop is
shut down or goes off the
network. Users who mainly
use putty, for example, to
access the command line and
run SAS programs in batch
may not need to use the Xen
desktop.
What should I use the Xen desktop for? To access SAS EM and SAS
EG, the Xen desktop is
required. Other applications,
including MS Office and
MobaXterm, can also be
accessed via Xen.
Where should I store files? You can access Onedrive from
both your laptop and the Xen,
and you can share files with
colleagues. You can also save
documents locally to your Xen.
How can I print from SAS EG, SAS EM, etc. on the You will need to add the printer
Xen desktop? via its IP address using
Windows find printer.

Private & Confidential

18
epsilon.com
Creating a New Issue on the Sharepoint Site
The URL for the SAS replatform Sharepoint site is:
https://epsilon.sharepoint.com/teams/SASReplatform201804/Lists/SASReplatformIssue
Tracking/AllItems.aspx

To create a New Issue:

1) Go to the URL above


2) Click New:

3) Enter information in the form that pops up:


a. Create a very brief title
b. Leave “Assigned to” blank, leave “Issue status” as Active, and leave
“Priority” as Normal
i. If you feel this is an urgent issue, please email me and Zain Rizvi
separately to escalate
c. In the “Description” box, describe the issue in as much detail as possible,
including
i. When the error happened
ii. Any scripts, programs, code or logs, if applicable
iii. Screen shots, if applicable
iv. Whether the error is consistent or intermittent
d. If you have screenshots or files to attach, click in the “Attachments” area
Private & Confidential

under “Add attachments” ; otherwise, leave all other fields as-is

19
epsilon.com
e. Click Save at the bottom of the form

This will add a new issue to the list and generate an email notification to me and anyone
else who has created an alert on this list.

Private & Confidential

20
epsilon.com

Vous aimerez peut-être aussi