Fraktal SAS Programming: Unterschied zwischen den Versionen
K (→Preface) |
K |
||
Zeile 21: | Zeile 21: | ||
Of course, the result will be a dynamic, self-documenting, metadata driven and generic sort of thing. | Of course, the result will be a dynamic, self-documenting, metadata driven and generic sort of thing. | ||
− | That’s why SAS starters feel lonesome and hence, matured users have organized themselves in non-commercial networks worldwide, the largest of which is PhUSE, the | + | That’s why SAS starters feel lonesome and hence, matured users have organized themselves in non-commercial networks worldwide, the largest of which is '''PhUSE''', the '''''[http://www.phuse.eu Pharmaceutical User Software Exchange]'''''. |
'''Are you ready?''' | '''Are you ready?''' | ||
'''Welcome to the club!''' | '''Welcome to the club!''' | ||
+ | |||
+ | ==Coding== | ||
+ | |||
+ | ===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 this 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?''' |
Version vom 2. Juli 2013, 17:01 Uhr
Inhaltsverzeichnis
Preface
The SAS System (SAS) is an impressive powerful ecosystem of languages, tools and programs leaving the user with all means at hand to work with data and satisfy his curiosity, be it of scientific origin or simply driven by work orders in a top-down ruled organization.
Given the above, it is not surprising that
- SAS license fees appear high, and
- the individual trying to start a user career feels pretty lonesome.
Since no one would buy a modern smartphone to simply make phone calls it is likewise un-appropriate to use SAS solely as a
- SQL database system
- basket of tabulation programs
- graphics toolbox
- web publishing agent
- data-warehouse platform
- statistics package
- metadata manager
- source code generator
Indeed, SAS can perform any of these functions, and more, and even worse, a small team of SAS geeks can deliver any combination of them as scenario-tailored application in an awesome short time frame.
Of course, the result will be a dynamic, self-documenting, metadata driven and generic sort of thing.
That’s why SAS starters feel lonesome and hence, matured users have organized themselves in non-commercial networks worldwide, the largest of which is PhUSE, the Pharmaceutical User Software Exchange.
Are you ready?
Welcome to the club!
Coding
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 this 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?