SAS Library
Overview of the SAS Language


This page was adapted from a page created by Oliver Schabenberger.  We thank Professor Schabenberger for permission to adapt and distribute this page via our web site.


1. Basic rules
2. SAS programs
3. Options
4. Titles
5. Comments

1. Basic rules  

2. SAS programs  

DATA MYDATA;
  <statements and/or data>
RUN;

DATA MYDATA;
  <statements and/or data>
RUN;

DATA NEXTDATA;

  <statements and/or data>
RUN;

PROC PRINT;
RUN;

 DATA MYDATA;
  <statements and/or data>
RUN;

PROC PRINT; RUN;
DATA NEXTDATA;
  <statements and/or data>
RUN;

DATA MYDATA;
  <statements and/or data>
RUN;

DATA NEXTDATA;
  <statements and/or data>
RUN;

PROC PRINT DATA=MYDATA;
RUN;

3. Options

options ls=84 ps=64 nocenter;

4. Titles

title 'Contents of data set MYDATA';

title 'Contents of data set MYDATA';
title2 'The data were collected in July 1998 in a total of ';
title3 '100 man hours of field measurements and 40 lab hours';

title;

title 'This is my data;
data mydata;
  input a b c;
  datalines;
1 2 3
4 5 6
;
run;

WARNING: The current word or quoted string has become more than 200
         characters long.  You may have unbalanced quotation marks.
NOTE: A single quote (') will terminate this quoted string.

';

title "This is John Smith's data";

5. Comments

* I am now creating my data set MYDATA;
data mydata;
  input a b c;
< and so forth>

/*

 

*/

How to cite this page

Report an error on this page or leave a comment

The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California.