SAS --- SAS (Statistical Analysis System) provides extensive statistical capabilities, including tools for both specialized and enterprise-wide analytical needs. SAS includes a wide range of statistical analyses, including analysis of variance, regression analysis, categorical data analysis, multivariate analysis, survival analysis, psychometric analysis, cluster analysis, and nonparametric analysis. Interactive Mode ################ 1. SSH onto the *mercury* login node with X11 forwarding :code:`ssh -X @mercury.chicagobooth.edu` 2. Request an interactive session on a compute node :code:`srun --mem=16G --pty bash --login` 3. Load the module with the desired version of SAS :code:`module load sas/9/9.4` 4. Start SAS by typing: :code:`sas` .. Note:: Remember to use X11 forwarding to connect to SAS in interactive mode Batch Mode ########## .. Navigate to the directory with your SAS program that you want to run. .. Type :code:`batch-sas ` at the prompt, where program.sas is the name of your program file. .. To run SAS in Batch Mode with the NOTERMINAL switch activated: .. Navigate to the directory with your SAS program that you want to run. .. Type :code:`batch-sas-noterminal ` at the prompt, where program is the name of your program file. .. If the program executes without any syntax errors, SAS creates an output file called .lst in the current directory and a second output file named batch.out in your home directory. .. If the program contained errors, SAS creates an output file called .log in the current directory and a second error file named batch.err in your home directory. To run SAS in batch mode, generate a submission script similar to the one below, and run by typing :code:`sbatch submit.sh`. .. code-block:: bash :caption: submit.sh #!/bin/bash #SBATCH --account=phd #SBATCH --mem=1G #SBATCH --time=0-01:00:00 #SBATCH --job-name=example_job # Load the module with the desired version of matlab module load sas/9/9.4 # create a new scratch directory for this job scratch_dir="/scratch/${SLURM_JOB_USER}/${SLURM_JOB_ID}" mkdir -p $scratch_dir # run script named myscript sas -work $scratch_dir -noterminal myscript # remove scratch directory when done rm -r $scratch_dir