Getting started with SAS on Phoenix
To make these directories accessible to SAS requires that SAS be
started with a special autoexec.sas.
The steps below will set up your phoenix account so that SAS always starts with these directories defined.
phoenix.yorku.ca. (You can obtain the 1 page document, How to Logon to Unix from the HelpDesk in Steacie.)
setenv SAS612_OPTIONS "-autoexec /courses/as/psyc/autoexec.sas"to your
.cshrc file.
The easiest way to do this is with the PICO editor, as shown below. The '%' character represents the unix prompt.
% pico .cshrcMove the cursor to last blank line; type:
setenv SAS612_OPTIONS "-autoexec /courses/as/psyc/autoexec.sas"
press Ctrl-X to save the changes, and exit pico
type Y to confirm
press Enter
% source .cshrcThis will cause the course data files and macros to become available to SAS when it starts up.
setenv SAS612_OPTIONS
command will be executed automatically whenever you login or open a new window.
Alternatively, you can accomplish the same thing by simply copying the autoexec.sas file to your home directory.
% cp /courses/as/psyc/autoexec.sas ~(but if I change it, you'll still have the old copy.)
% pico assign3.sas %include nwk(nwkp0415); proc reg data=solution; model y = time; ... etc ...press Ctrl-X, type Y, press Enter to Save the file.
% sas assign3
more command:
% more assign3.lst
% sas -fsdevice ascii.vt100The display should look like this:
+LOG---------------------------------------------------------------------------+ |Command ===> | | | |NOTE: AUTOEXEC processing beginning; file is | | /courses/as/psyc/autoexec.sas. | | | |NOTE: SAS initialization used: | | real time 8.34 seconds | | cpu time 0.24 seconds | | | |NOTE: AUTOEXEC processing completed. | +------------------------------------------------------------------------------+ +PROGRAM EDITOR----------------------------------------------------------------+ |Command ===> | | | |00001 | |00002 | |00003 | |00004 | |00005 | |00006 | +------------------------------------------------------------------------------+The default display does not show menus. To use the SAS menus, type the command pmenu on on the SAS Program Manager command line (after the ===>).
lpr command to print a file from phoenix. Your printed output is routed to a printer determined by the PRINTER environment variable, or by the -P option on the lpr command.
(But note that the printers in BSB are now on the charged print-release
system, and disappear from the print queue after 2 hours.)
Some printers are:
To select the bsb_159 as the default printer for your session, and print the .lst and .log files for an assignment, enter the commands:
% setenv PRINTER bsb_159 % lpr assign3.log % lpr assign3.lstIf you mostly use one printer, you can add the
setenv PRINTER
to your .cshrc file.
For some people, PostScript graphics are easiest because they can be printed directly on Laserjet 4M or 5Si printers, and can be viewed at home using the free GSView/Ghostscript package for Windows.
To generate graphics files from SAS, simply include the following lines in your SAS program before the point where any graphics are created:
%newsas(filename); %pscolor; or %gif;where filename is the name of your SAS file. The graphic output will then appear in a file named filename.ps in your current working directory. (For GIF output use %gif; instead of %pscolor;.) [If you omit the statement %newsas(filename), the output will appear in a file named grfout.ps.]