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

Aus phenixxenia.org
Zur Navigation springen Zur Suche springen
K
K
Zeile 9: Zeile 9:
 
}}
 
}}
  
  %MACRO xset;
+
  %MACRO xset(xvar);
 
  filename path pipe "set" lrecl = 2048;
 
  filename path pipe "set" lrecl = 2048;
 
  data _NULL_;
 
  data _NULL_;
Zeile 15: Zeile 15:
 
  infile path dlm = '=';
 
  infile path dlm = '=';
 
  input xvar $ xval $;
 
  input xvar $ xval $;
  xvar = translate(xvar,'_','(-)');
+
  xvar = upcase(translate(xvar,'_','(-)'));
 +
%IF &XVAR. ne %THEN if trim(xvar) = "%UPCASE(&XVAR.)";;
 
  call symput(compress(xvar),compress(xval));
 
  call symput(compress(xvar),compress(xval));
 
  run;
 
  run;

Version vom 22. Juli 2014, 10:41 Uhr

Zurück

Übersicht

Vorwärts

%MACRO xset(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 &XVAR. ne %THEN if trim(xvar) = "%UPCASE(&XVAR.)";;
call symput(compress(xvar),compress(xval));
run;
%MEND xset;

Zurück

Übersicht

Vorwärts