Section 2.5: SAS Provides a Written Record of Your Work One of the great strengths of SAS is its top-down functionality, which allows you to compose a sequence of DATA and PROC steps that together work to form an extended programming environment. Data can be read with a DATA step and analyzed in a PROC step, and the PROC step itself can write an output dataset that can be passed along to subsequent DATA or PROC steps. Another nice feature of a SAS program is that it is 'self-documenting': SAS statements and your inserted comments provide a written record of what computations were done, and perhaps more importantly, what you didn't do. In many cases they can be repeated or quickly modified to analyze data of a similar structure. The general flow of a SAS program is now briefly described. It usually begins with several statements that set up the working environment, format the printed output, specify directories of files, etc. (e.g. OPTIONS, TITLEn, LIBNAME, FILENAME etc.) followed by specific DATA and PROC steps to perform desired tasks. OPTIONS ; TITLE1 ' '; LIBNAME libref ''; * write one or more user defined formats; PROC FORMAT; VALUE fmta ; * numeric data; VALUE $fmtb ; * character data ; RUN; * read data from an external file or an existing SAS dataset; DATA ; ; RUN; * perform desired analyses; PROC ; ; RUN; PROC ; ; RUN; * modify the dataset written from the first DATA step; * modify a dataset written by a previous PROC step; DATA ; SET ; ; RUN; PROC ; ; RUN;