Macro rXDIR (from Fraktal SAS Programming)

Aus phenixxenia.org
Version vom 27. August 2014, 14:06 Uhr von Wolf-Dieter Batz (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „Kategorie:Zazy {{SeitenNavigation1 |hoch=Duck_zazy_com.png |links=xx_left.png |rechts=xx_right.png |übersicht=Macro XDIR (from Fraktal SAS Programming) |z…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

Zurück

Übersicht

Vorwärts

What it does

This SAS Macro provides the function from XDIR in an interactive mode.

  • The recursive use of macro invocation keeps the macro "alive" until no further user input is made.
  • It might be of some interest to the novice user, how easy it is, to turn a simple "home-grew" function into an interactive tool.
Code executed Function performed

%MACRO rxdir(xpath);

%GLOBAL rpath;

%LET xpath = ;

%WINDOW path

irow = 20 rows = 14 icolumn = 130 columns = 64

3 @5 "Current Path
  1. &RPATH."

5 @5 'Enter path
  1. ' xpath 40 attr = blink

 ;

%DISPLAY path;

%IF %LENGTH(&XPATH.) = 0 %THEN %GOTO leave;

%LET rpath = &RPATH.&XPATH.\;

filename path pipe "dir /b ""&RPATH.""" lrecl = 256;

%PUT ---&RPATH.---;

data _NULL_;

length entry $256;

infile path length = lrecl;

input entry $varying256. lrecl;

put entry;

run;

%RXDIR(&RPATH.)

%LEAVE

filename path clear;

%MEND rxdir;

END macro definition with name

|hoch=Duck_zazy_com.png |links=xx_left.png |rechts=xx_right.png |übersicht=Macro XDIR (from Fraktal SAS Programming) |zurück=Macro rXDIR (from Fraktal SAS Programming) |vorwärts=Macro rXDIR (from Fraktal SAS Programming) }}