Macro XSET (from Fraktal SAS Programming): Unterschied zwischen den Versionen

Aus phenixxenia.org
Zur Navigation springen Zur Suche springen
K
K
Zeile 14: Zeile 14:
 
|-
 
|-
 
|
 
|
%MACRO xset(xvar);
+
;%MACRO xset(xvar);
|
+
|Start Macro definition with name and positional parameter 'xvar'
 
|-
 
|-
 
|
 
|
filename path pipe "set" lrecl = 2048;
+
:filename path pipe "set" lrecl = 2048;
 
|
 
|
 
|-
 
|-
 
|
 
|
data _NULL_;
+
;data _NULL_;
 
|
 
|
 
|-
 
|-
 
|
 
|
length xvar $256 xval $1024;
+
:length xvar $256 xval $1024;
 
|
 
|
 
|-
 
|-
 
|
 
|
infile path dlm = '=';
+
:infile path dlm = '=';
 
|
 
|
 
|-
 
|-
 
|
 
|
input xvar $ xval $;
+
:input xvar $ xval $;
 
|
 
|
 
|-
 
|-
 
|
 
|
xvar = upcase(translate(xvar,'_','(-)'));
+
:xvar = upcase(translate(xvar,'_','(-)'));
 
|
 
|
 
|-
 
|-
 
|
 
|
%IF %LENGTH(&XVAR.) <> 0 %THEN %DO;
+
;%IF %LENGTH(&XVAR.) <> 0 %THEN %DO;
 
|
 
|
 
|-
 
|-
 
|
 
|
if trim(xvar) = "%UPCASE(&XVAR.)";
+
:if trim(xvar) = "%UPCASE(&XVAR.)";
 
|
 
|
 
|-
 
|-
 
|
 
|
%END;
+
;%END;
 
|
 
|
 
|-
 
|-
 
|
 
|
call symput(compress(xvar),compress(xval));
+
:call symput(compress(xvar),compress(xval));
 
|
 
|
 
|-
 
|-
 
|
 
|
run;
+
;run;
 
|
 
|
 
|-
 
|-
 
|
 
|
filename path clear;
+
:filename path clear;
 
|
 
|
 
|-
 
|-
 
|
 
|
%MEND xset;
+
;%MEND xset;
|
+
|End Macro definition with name
 
|}
 
|}
  

Version vom 29. Juli 2014, 15:38 Uhr

Zurück

Übersicht

Vorwärts

Code executed Function performed
%MACRO xset(xvar);
Start Macro definition with name and positional parameter 'xvar'
filename path pipe "set" lrecl = 2048;
data _NULL_;
length xvar $256 xval $1024;
infile path dlm = '=';
input xvar $ xval $;
xvar = upcase(translate(xvar,'_','(-)'));
%IF %LENGTH(&XVAR.) <> 0 %THEN %DO;
if trim(xvar) = "%UPCASE(&XVAR.)";
%END;
call symput(compress(xvar),compress(xval));
run;
filename path clear;
%MEND xset;
End Macro definition with name

Zurück

Übersicht

Vorwärts