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

Aus phenixxenia.org
Zur Navigation springen Zur Suche springen
K
K
Zeile 9: Zeile 9:
 
}}
 
}}
  
%MACRO xdir(xpath);
+
{|
%IF %LENGTH(&XPATH.) eq 0 %THEN %DO;
+
! Code executed
%WINDOW path  
+
! Function performed
  irow = 20 rows = 14 icolumn = 30 columns = 64         
+
|
  #4 @5 'Enter path: ' xpath 40 attr = underline                 
+
|-
;
+
|
%DISPLAY path;
+
;%MACRO xdir(xpath);
%END;
+
|
filename path pipe "dir /b ""&XPATH.""" lrecl = 256;
+
|-
data _NULL_;
+
|
length entry $256;
+
;%IF %LENGTH(&XPATH.) eq 0 %THEN %DO;
infile path length = lrecl;
+
|
input entry $varying256. lrecl;
+
|-
  put entry;  
+
|
run;
+
;%WINDOW path  
filename path clear;
+
|
%MEND xdir;
+
|-
 +
|
 +
: irow = 20 rows = 14 icolumn = 30 columns = 64         
 +
|
 +
|-
 +
|
 +
: #4 @5 'Enter path: ' xpath 40 attr = underline                 
 +
|
 +
|-
 +
|
 +
;;
 +
|
 +
|-
 +
|
 +
:%DISPLAY path;
 +
|
 +
|-
 +
|
 +
;%END;
 +
|
 +
|-
 +
|
 +
;filename path pipe "dir /b ""&XPATH.""" lrecl = 256;
 +
|
 +
|-
 +
|
 +
;data _NULL_;
 +
|
 +
|-
 +
|
 +
:length entry $256;
 +
|
 +
|-
 +
|
 +
:infile path length = lrecl;
 +
|
 +
|-
 +
|
 +
:input entry $varying256. lrecl;
 +
|
 +
|-
 +
|
 +
put entry;  
 +
|
 +
|-
 +
|
 +
;run;
 +
|
 +
|-
 +
|
 +
;filename path clear;
 +
|
 +
|-
 +
|
 +
;%MEND xdir;
 +
|}
  
 
{{SeitenNavigation1
 
{{SeitenNavigation1

Version vom 31. Juli 2014, 15:44 Uhr

Zurück

Übersicht

Vorwärts

Code executed Function performed
%MACRO xdir(xpath);
%IF %LENGTH(&XPATH.) eq 0 %THEN %DO;
%WINDOW path
irow = 20 rows = 14 icolumn = 30 columns = 64
#4 @5 'Enter path: ' xpath 40 attr = underline
%DISPLAY path;
%END;
filename path pipe "dir /b ""&XPATH.""" lrecl = 256;
data _NULL_;
length entry $256;
infile path length = lrecl;
input entry $varying256. lrecl;
put entry;
run;
filename path clear;
%MEND xdir;

Zurück

Übersicht

Vorwärts