SAS on Unix/Linux- from the terminal to GUI.

Similar documents
Tutorial Guide to the IS Unix Service

Command Line - Part 1

Tutorial 0A Programming on the command line

Introduction to the UNIX Operating System and Open Windows Desktop Environment

Unix Guide. Logo Reproduction. School of Computing & Information Systems. Colours red and black on white backgroun

Cisco Networking Academy Program Curriculum Scope & Sequence. Fundamentals of UNIX version 2.0 (July, 2002)

ICS 351: Today's plan

Fred Hantelmann LINUX. Start-up Guide. A self-contained introduction. With 57 Figures. Springer

Linux command line. An introduction to the Linux command line for genomics. Susan Fairley

Editing Files on Remote File Systems

Command-Line Operations : The Shell. Don't fear the command line...

Introduction to Mac OS X

Linux Overview. Local facilities. Linux commands. The vi (gvim) editor

Command Line Crash Course For Unix

CS 103 Lab Linux and Virtual Machines

Unix Tools. Overview. Editors. Editors nedit vi Browsers/HTML Editors Mail Tools Utilities xv xman ftp

Basic C Shell. helpdesk@stat.rice.edu. 11th August 2003

Beyond Windows: Using the Linux Servers and the Grid

Introduction to Linux and Cluster Basics for the CCR General Computing Cluster

UNIX Comes to the Rescue: A Comparison between UNIX SAS and PC SAS

Thirty Useful Unix Commands

A UNIX/Linux in a nutshell

CSIL MiniCourses. Introduction To Unix (I) John Lekberg Sean Hogan Cannon Matthews Graham Smith. Updated on:

Kernel. What is an Operating System? Systems Software and Application Software. The core of an OS is called kernel, which. Module 9: Operating Systems

New Lab Intro to KDE Terminal Konsole

Introduction to Running Hadoop on the High Performance Clusters at the Center for Computational Research

Lab 1: Introduction to C, ASCII ART and the Linux Command Line Environment

1 Basic commands. 2 Terminology. CS61B, Fall 2009 Simple UNIX Commands P. N. Hilfinger

A Crash Course on UNIX

Unix Sampler. PEOPLE whoami id who

Vim, Emacs, and JUnit Testing. Audience: Students in CS 331 Written by: Kathleen Lockhart, CS Tutor

University of Toronto

Birmingham Environment for Academic Research. Introduction to Linux Quick Reference Guide. Research Computing Team V1.0

Lab 1 Beginning C Program

Introduction to Operating Systems

Unix the Bare Minimum

Running your first Linux Program

Lab 1: Introduction to the network lab

Open Source Computational Fluid Dynamics

Insight Video Net. LLC. CMS 2.0. Quick Installation Guide

Using a login script for deployment of Kaspersky Network Agent to Mac OS X clients

File management Editing X Window KDE. Debian/GNU Linux. Introduction II. Károly Erdei. November 21, Károly Erdei Debian/GNU Linux 1/45

LECTURE-7. Introduction to DOS. Introduction to UNIX/LINUX OS. Introduction to Windows. Topics:

UNIX Basics. Ian Darwin TCP Informatics January, Presented from a Mac using Apple s Keynote presentation software

An Introduction to the Linux Command Shell For Beginners

WinSCP PuTTY as an alternative to F-Secure July 11, 2006

SSH Connections MACs the MAC XTerm application can be used to create an ssh connection, no utility is needed.

Performing Database and File System Backups and Restores Using Oracle Secure Backup

Installing and Running MOVES on Linux

Compuprint 4247 Serial Matrix Printers

An Introduction to Using the Command Line Interface (CLI) to Work with Files and Directories

Training Day : Linux

Agenda. Using HPC Wales 2

Version control. HEAD is the name of the latest revision in the repository. It can be used in subversion rather than the latest revision number.

Shellshock Security Patch for X86

Programming for GCSE Topic H: Operating Systems

INASP: Effective Network Management Workshops

Linux System Administration on Red Hat

2 Advanced Session... Properties 3 Session profile... wizard. 5 Application... preferences. 3 ASCII / Binary... Transfer

PuTTY/Cygwin Tutorial. By Ben Meister Written for CS 23, Winter 2007

L01 Introduction to the Unix OS

TNM093 Practical Data Visualization and Virtual Reality Laboratory Platform

3 IDE (Integrated Development Environment)

SNMP Upgrade Procedure for NV Transmitters

CMSC 216 UNIX tutorial Fall 2010

The Linux Operating System and Linux-Related Issues

Installing IBM Websphere Application Server 7 and 8 on OS4 Enterprise Linux

SSH and Basic Commands

RDM+ Remote Desktop for Mobiles For Blackberry Playbook

QUICK START BASIC LINUX AND G++ COMMANDS. Prepared By: Pn. Azura Bt Ishak

Linux für bwgrid. Sabine Richling, Heinz Kredel. Universitätsrechenzentrum Heidelberg Rechenzentrum Universität Mannheim. 27.

While You Were Sleeping - Scheduling SAS Jobs to Run Automatically Faron Kincheloe, Baylor University, Waco, TX

Basic Linux and Unix commands, editing and transfering files

Web Hosting: Pipeline Program Technical Self Study Guide

Downloading Files using FTP

Hadoop Basics with InfoSphere BigInsights

Linux Labs: mini survival guide

Basic Linux & Package Management. Original slides from GTFO Security

UNIX Tutorial for Beginners

Cygwin command line windows. Get that Linux feeling - on Windows

Extreme computing lab exercises Session one

CPSC 226 Lab Nine Fall 2015

Extending Remote Desktop for Large Installations. Distributed Package Installs

Introduction to the new mainframe Chapter 4: Interactive facilities of z/os: TSO/E, ISPF, and UNIX

List of FTP commands for the Microsoft command-line FTP client

StrikeRisk v6.0 IEC/EN Risk Management Software Getting Started

for Networks Installation Guide for the application on a server September 2015 (GUIDE 2) Memory Booster version 1.3-N and later

Version Control with Subversion and Xcode

Microsoft Word Revising Word Documents Using Markup Tools

Introduction to Unix Tutorial

QACenter Installation and Configuration Guide. Release 4.4.2

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 2 Introducing Operating Systems

Syntax: cd <Path> Or cd $<Custom/Standard Top Name>_TOP (In CAPS)

Equivalence of ISPF and RDz LPEX Editor Functions

While You Were Sleeping - Scheduling SAS Jobs to Run Automatically Faron Kincheloe, Baylor University, Waco, TX

State of Michigan Data Exchange Gateway. Web-Interface Users Guide

Unix Primer - Basic Commands In the Unix Shell

IBM Software Hadoop Fundamentals

Microsoft Visual Studio Integration Guide

Transcription:

SAS on Unix/Linux- from the terminal to GUI. L Gakava & S Kannan October 2015

Agenda All about the terminal o Customising your terminal o Basic Linux terminal commands o Running SAS in non-interactive mode o Available SAS file editors o What to look out for on Unix/Linux platform All about Graphical User Interface (GUI) o Launching SAS GUI. o Changing SAS default behaviour o SAS ToolBox commands o SAS editor commands.

Motivation - Why Use SAS On Unix/Linux? Using SAS on UNIX/Linux Platform o Company migrating to UNIX/Linux o Joining a company which is using SAS on the Linux platform Challenge Too many commands to learn! Why Use SAS On Unix/Linux o Customising Linux sessions will ensure you increase work efficiency by taking advantage of the imbedded Linux tools. In general transferring and running large files will be quicker in Linux compared to PC*.

Terminal What to expect when you login? % pwd /home/username % ls Customise: Update.bashrc file with this line PS1='$IV $PWD$EE> ' will change your prompt to show the following: /home/username>

Terminal Navigation Command ls ls -a mkdir cd directory cd cd ~ cd.. Meaning list files and directories list all files and directories make a directory change to named directory change to home-directory change to home-directory change to parent directory

Terminal Navigation Command cp file1 file2 mv file1 file2 rm file rmdir directory cat file less file head file tail file grep 'keyword' file wc file Meaning copy file1 and call it file2 move or rename file1 to file2 remove a file remove a directory display a file display a file a page at a time display the first few lines of a file display the last few lines of a file search a file for keywords count number of lines/words/ characters in file

Terminal useful commands How do you find out if a version of a file has changed? /home/username>diff file1.txt file2.txt Command to compare two files. This is useful to compare outputs that have been re-run with an older version. This will compare line by line, hence it s only useful to compare different versions of the same file. This command cannot be used to compare datasets.

Terminal useful commands How do I search for text in multiple files? /home/username>grep -i <string filename> How do I run SAS in non-interactive mode/batch? /home/username>sas <filename> How do I run code that is resource intensive? /home/username> sas memsize max mysascode.sas

Editing SAS files How do I edit SAS files? Linux editors for plain text can be divided into two categories: 1. Console text editors- include emacs, jed, nano, pico and vim. 2. Graphical GUI editors - include gvim, gedit, Nedit, Slick edit, Tea and Sublime The advantage of the GUI editor is intuitive user friendly interface while the benefit of the console text editor is the suitability over long distance network connections which may or may not provide suitable bandwidth or reliability which would both be required by the GUI editors for remote operation. Console based text editors. GUI editors Face to face meeting or teleconference.

What to look out for? LINUX platform is case sensitive and file directories and external file names called within SAS are case sensitive but the SAS session is not. Code written in PC SAS might not run on SAS because the Microsoft Windows and Linux operating systems store text files in a different format. It is good practice convert a file from Microsoft Windows to Linux format by using a dos2unix command on the terminal. /home/username> dos2unix mysascode.sas

Still other things Other things to keep in mind Use the & at the end of Linux commands. This means the command will be executed in the background and you can continue using the terminal. Otherwise you will have to wait for the command to execute before you can use the terminal. If you have a 3-button mouse you can copy text by highlighting the text using your mouse. This automatically copies the text and you can paste the text by pressing down the wheel on the mouse.

Terminal help If in doubt man it!!! Type man or fman command to access the system's reference manuals. It can be used to search for occurrences of specific text and other useful functions.

ALL ABOUT GUI /home/username>sas&

Changing default behavior Selecting and copying text

Changing default behavior Truncation of inserted text? Text is not split at the cursor when you press ENTER or RETURN? I cannot use PC shortcuts to copy and paste texts? Modify the entries in the SAS: KEYS window

Changing default behavior

Remember my configuration settings?

SAS ToolBox

Program editor commands

Editing commands Copy c[n] Mark 1 or N lines to be copied cc Move m[n] mm Delete d[n] dd Insert ia[n] i[n] ib[n] Mark boundary of block to be copied Mark 1 or N lines to be moved Mark boundary of block to be moved Mark 1 or N lines to be deleted Mark boundary of block to be deleted Insert 1 or N lines after this point Insert 1 or N lines from this point Insert 1 or N lines before this point

Other useful editing commands Changing case cu[n] cl[n] ccu ccl mcu mcl Justification jl[n] jjl[n] jc[n] jjc[n] jr[n] jjr Change 1 or N lines to upper case Change 1 or N lines to lower case Change block to upper case Change block to lower case Change marked text to upper case Change marked text to lower case Left justify line to position N Left justify block to position N Centre justify to line length N Centre justify block to line length N Right justify 1 or N lines Right justify block

Other useful editing commands Repetition r[n] rr Indentation >[N] >>[N] )[N] ))[N] <[N] <<[N] ([N] (([N] Repeat 1 or N times Repeat block Right shift 1 or N spaces Right shift block 1 or N spaces Right shift destructive 1 or N spaces Right shift destructive block 1 or N spaces Left shift 1 or N spaces Left shift block 1 or N spaces Left shift destructive 1 or N spaces Left shift destructive block 1 or N spaces

CONCLUSION This presentation gives the basis for a less painful transition to using SAS on Linux from PC. o There is greater flexibility in using Linux and the reader is encouraged to explore this in more detail to increase their productivity when using SAS on Linux.

References Assignment.essayshark.com,. (2015). Retrieved 24 September 2015, from https://assignment.essayshark.com/blog/wp-content/uploads/2015/08/programming-help.png Computerhope.com,. (2015). Linux and Unix diff command help and examples. Retrieved 22 September 2015, from http://www.computerhope.com/unix/udiff.htm Cyberciti.biz,. (2015). How to: Change / Setup bash custom prompt (PS1). Retrieved 22 September 2015, from http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html Ee.surrey.ac.uk,. (2000). UNIX Tutorial - Introduction. Retrieved 22 September 2015, from http://www.ee.surrey.ac.uk/teaching/unix/unixintro.html Ippolito, G. (2015). Linux Text Editors. Yolinux.com. Retrieved 22 September 2015, from http://www.yolinux.com/tutorials/linuxtexteditors.html Support.sas.com,. (2015). AUTOSPLIT, AUTOFLOW Command. Retrieved 25 September 2015, from http://support.sas.com/documentation/cdl/en/hostunx/61879/html/default/viewer.htm#a003284265.htm Support.sas.com,. (2015). Browsing and Editing SAS Data Sets. Retrieved 25 September 2015, from http://support.sas.com/documentation/cdl/en/fspproc/59583/html/default/viewer.htm#a000430506.htm Support.sas.com,. (2015). Getting Started with SAS in UNIX Environments. Retrieved 25 September 2015, from http://support.sas.com/documentation/cdl/en/hostunx/61879/html/default/viewer.htm#usas.htm Support.sas.com,. (2015). SAS Windowing Environment in UNIX Environments. Retrieved 25 September 2015, from http://support.sas.com/documentation/cdl/en/hostunx/61879/html/default/viewer.htm#a002460895.htm Support.sas.com,. (2015). The SAS ToolBox in UNIX Environments. Retrieved 25 September 2015, from http://support.sas.com/documentation/cdl/en/hostunx/61879/html/default/viewer.htm#a000291162.htm Wikipedia,. (2015). Bash (Unix shell). Retrieved 22 September 2015, from https://en.wikipedia.org/wiki/bash_%28unix_shell%29 Wikipedia,. (2015). Diff utility. Retrieved 22 September 2015, from https://en.wikipedia.org/wiki/diff_utility William Shotts, J. (2015). LinuxCommand.org: Learn the Linux command line. Write shell scripts.. Linuxcommand.org. Retrieved 22 September 2015, from http://linuxcommand.org/index.php Www2.ocean.washington.edu,. (2015). Unix Tutorial. Retrieved 22 September 2015, from http://www2.ocean.washington.edu/unix.tutorial.html#files