Explicit Coding (from Fraktal SAS Programming)

Aus phenixxenia.org
Zur Navigation springen Zur Suche springen

Zurück

Übersicht

Vorwärts

Groups

The SAS compiler processes the source code submitted in so called steps which in turn are comprised from groups of lines terminated by a semicolon. If users do not code full steps, then SAS completes the code up to a certain amount.

Lines terminated with semicolon are called statements.

Steps comprised from statements like above are called run groups.

Logically, the submitted code from the above example, will be transformed into three run groups that are executed in discrete steps. In each step syntax check and handling of user feedback is handled separately.

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;
run;
proc sort data=basix out=basix; 
by lat;
run;
proc print data=basix; 
run;


Segments

As already emphasized, SAS coded workflow is processed as sequence of blocks or groups. Since this processing structure is used everywhere in SAS, we will refer to these blocks and groups as segments throughout the remainder of this text.

Due to various languages available inside SAS, particular segments might have their very special appearance. The run group example from above is merely one of them.

Segments from different syntaxes may be hierarchically nested.

Segments may not intersect, with one exception, however.

Zurück

Übersicht

Vorwärts