Apply Logic (from Fraktal SAS Programming): Unterschied zwischen den Versionen
K |
K |
||
(3 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 2: | Zeile 2: | ||
{{SeitenNavigation1 | {{SeitenNavigation1 | ||
|links=xx_left.png | |links=xx_left.png | ||
− | |zurück= | + | |zurück=Realtime Information (from Fraktal SAS Programming) |
|rechts=xx_right.png | |rechts=xx_right.png | ||
− | |vorwärts= | + | |vorwärts=Process Metadata (from Fraktal SAS Programming) |
|hoch=Duck_zazy_com.png | |hoch=Duck_zazy_com.png | ||
− | |übersicht= | + | |übersicht=Extending Control (from Fraktal SAS Programming) |
}} | }} | ||
Zeile 30: | Zeile 30: | ||
{{SeitenNavigation1 | {{SeitenNavigation1 | ||
|links=xx_left.png | |links=xx_left.png | ||
− | |zurück= | + | |zurück=Realtime Information (from Fraktal SAS Programming) |
|rechts=xx_right.png | |rechts=xx_right.png | ||
− | |vorwärts= | + | |vorwärts=Process Metadata (from Fraktal SAS Programming) |
|hoch=Duck_zazy_com.png | |hoch=Duck_zazy_com.png | ||
− | |übersicht= | + | |übersicht=Extending Control (from Fraktal SAS Programming) |
}} | }} |
Aktuelle Version vom 13. Mai 2014, 20:43 Uhr
Implementing MACRO logic is quite comparable to other languages, except that SAS requires so-called MACRO Triggers ("TRIGGERS"”) to direct processing to the appropriate subsystem inside the SAS ecosystem. These are:
& – the ampersand: indicates parameter reference
% - the percent sign: indicates syntax elements
TRIGGERS have been found necessary in the early history of SAS since the SAS Macro Facility was intended to perform text processing before code was sent to the SAS compiler. To invoke the text pre-processor every token is checked whether its 1st digit is a TRIGGER.
Of course the segment structure of coding also applies here:
%IF %LENGTH(&PARM_I.) ne 0 %THEN %DO; program code %END; %ELSE %DO; alternate program code %END;
Depending on whether a value is supplied in parameter PARM_I either "program code" or "alternate program code" is passed to the SAS compiler for processing.