Implicit Coding (from Fraktal SAS Programming)

Aus phenixxenia.org
Wechseln zu: Navigation, Suche

Zurück

Übersicht

Vorwärts

Rules?

While there is no technical reason to introduce and follow coding rules and typographical conventions, it has proven as helpful to do so depending on working context and purpose that is followed.

SAS is freedom is good news for most ad-hoc programmers aiming to have results the same minute.

SAS is freedom is bad news for all team leads and managers bearing responsibility for sustainable usage of resources and maintenance of programs written by individuals that will most likely leave some day.

Throughout the text of this tutorial we will therefore adhere to a set of rules that might seem superfluous at 1st sight but will help to catch structure and process implemented in a program without deep-diving into the code.


Standards!

SAS supports modular coding very well because code processing follows a block or “group” structure as the architects at SAS Institute Inc. would put it. Let’s directly jump into this topic:

data basix;
city='Washington'; lat="038° 054′ N"; long="077° 002′ W"; output;
city='Berlin'; lat="052° 031′ N"; long="013° 024′ O"; output;
city='Tokyo'; lat="035° 041′ N"; long="139° 046′ O"; output;
proc sort; by lat;
proc print; run;

This appears to be an easy to read and straightforward written program, and this is definitely true. And indeed, this code will complete without error messages and produce a formatted list of three cities along with their explicit latitude and longitude.

But this is not the program that is processed by SAS.

What does SAS see?

Zurück

Übersicht

Vorwärts