Appendix E. Coming to SAS from a Programming Language

You can write SAS programs that do many of the tasks that standard programming languages like C++, FORTRAN, and Visual BASIC can do. There are many similarities between SAS and these languages, but there are some important differences. If you are used to programming with these types of languages, learning SAS will be easier if you remember the differences.

Built-in Loop

The major difference is that SAS has a built-in loop for data handling. If you read data from a file, or process SAS data sets in the DATA step, SAS automatically loops through all the data. In a standard programming language, you typically need to set up an array to hold the data, then use a loop (DO, WHILE, or FOR) to process ...

Get The Little SAS® Book: A Primer, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.