Sas 简明教程

SAS - Environment

SAS Institute Inc. 已经发布了免费的 SAS University Edition ,它完全能满足学习 SAS 编程的需求。它提供了学习 BASE SAS 编程所需的所有功能,进而让你能够学习任何其他 SAS 组件。

SAS Institute Inc. has released a free SAS University Edition which is good enough for learning SAS programming. It provides all the features that you need to learn in BASE SAS programming which in turn enables you to learn any other SAS component.

下载和安装 SAS University Edition 的过程非常简单。它作为虚拟机提供,需要在虚拟环境中运行。在你运行 SAS 软件之前,你的 PC 中需要已经安装了虚拟化软件。在本教程中,我们将使用 VMware 。以下是下载、设置 SAS 环境和验证安装所涉及的步骤的详细信息。

The process of downloading and installing SAS University Edition is very straight forward. It is available as a virtual machine which needs to run on a virtual environment. You need to have virtualization software already installed in your PC before you can run the SAS software. In this tutorial we will be using VMware. Below are the details of the steps to download, setup the SAS environment and verify the installation.

Download SAS University Edition

SAS University Edition 可在此 URL 下载: SAS University Edition 。请向下滚动,在开始下载之前阅读系统要求。访问此 URL 会出现以下屏幕。

SAS University Edition is available for download at the URL SAS University Edition. Please scroll down to read the system requirements before you begin the download. The following screen appears on visiting this URL.

environment download link

Setup virtualization software

向下滚动到同一页面上以找到安装步骤 1。此步骤提供了获取适合你的虚拟化软件的链接。如果你已经在你的计算机中安装了其中任何一款软件,你可以跳过此步骤。

Scroll down on the same page to locate the installation stpe-1. This step provides the links to get the virtualization software that suits you. In case you already have any one of these softwares installed in your system, you can skip this step.

environment2 vm options

Quick start virtualization software

如果你对虚拟化环境完全陌生,你可以通过阅读步骤 2 中提供的以下指南和视频,来了解它。如果你已经熟悉它,你也可以跳过此步骤。

In case you are completely new to virtualization environment, you can familiarize yourself with it by going through the following guides and videos available as step-2. Again you can skip this step in case you are already familiar.

environment3 vm guides videos

Download the Zip file

在步骤 3 中,你可以选择与你所具有的虚拟化环境兼容的 SAS University Edition 的相应版本。它会下载为一个 zip 文件,文件名类似于 unvbasicvapp_9411005_vmx_en_sp0__1.zip

In step-3 you can choose the appropriate version of the SAS University Edition compatible with the virtualization environment you have. It downloads as a zip file with name similar to unvbasicvapp_9411005_vmx_en_sp0__1.zip

environment4 vm download

Unzip the zip file

以上 zip 文件需要解压缩并存储在一个合适的目录中。在我们案例中,我们选择了 VMware zip 文件,解压缩后显示以下文件。

The zip file above needs to be unzipped and stored in an appropriate directory. In our case we have chosen the VMware zip file which shows the following files after unzipping.

environment5 file unzip

Loading the virtual machine

启动 VMware 播放器(或工作站)并打开以扩展名 .vmx 结尾的文件。会出现以下屏幕。请注意分配给 vm 的基础设置,比如内存和硬盘空间。

Start the VMware player (or workstation) and open the file which ends with an extension .vmx. The below screen appears. Please notice the basic settings like memory and hard disk space allocated to the vm.

environment6 vm machine

Power on the virtual machine

点击绿色箭头标记旁边的 Power on this virtual machine 以启动虚拟机。会出现以下屏幕。

Click the Power on this virtual machine alongside the green arrow mark to start the virtual machine. The following screen appears.

environment7 vm machine poweron

当 SAS vm 处于加载状态时,会出现以下屏幕,正在运行的 vm 会提示转到一个 URL 位置,该位置将打开 SAS 环境。

The below screen appears when the SAS vm is in the state of loading after which the running vm gives a prompt to go to a URL location which will open the SAS environment.

environment8 vm running

Starting SAS studio

打开一个新的浏览器标签,并加载以上 URL(不同 PC 上的 URL 不同)。会出现以下屏幕,指示 SAS 环境已准备就绪。

Open a new browser tab and load the above URL (which differs from one PC to another). The below screen appears indicating the SAS environment is ready.

environment9 vm start studio

The SAS Environment

点击 Start SAS Studio ,我们便会获得 SAS 环境,它默认以视觉程序员模式打开,如下所示。

On clicking the Start SAS Studio we get the SAS environment which by default opens in the visual programmer mode as shown below.

environment10 vm visual programming

我们还可以通过点击下拉菜单来将其更改为 SAS 编程模式。

We can also change it to SAS programmer mode by clicking on the drop down.

environment11 vm SAS Programmer

现在我们可以开始编写 SAS 程序了。

Now we are ready to write SAS Programs.