Macro rXDIR (from Fraktal SAS Programming): Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
K |
K |
||
Zeile 27: | Zeile 27: | ||
| | | | ||
<font face="Courier New"> | <font face="Courier New"> | ||
− | + | :%GLOBAL rpath; | |
</font> | </font> | ||
| | | | ||
Zeile 33: | Zeile 33: | ||
| | | | ||
<font face="Courier New"> | <font face="Courier New"> | ||
− | + | :%LET xpath = ; | |
</font> | </font> | ||
| | | | ||
Zeile 45: | Zeile 45: | ||
| | | | ||
<font face="Courier New"> | <font face="Courier New"> | ||
− | + | :irow = 20 rows = 14 icolumn = 130 columns = 64 | |
</font> | </font> | ||
| | | | ||
Zeile 51: | Zeile 51: | ||
| | | | ||
<font face="Courier New"> | <font face="Courier New"> | ||
− | + | : #3 @5 "Current Path: &RPATH." | |
</font> | </font> | ||
| | | | ||
Zeile 57: | Zeile 57: | ||
| | | | ||
<font face="Courier New"> | <font face="Courier New"> | ||
− | + | : #5 @5 'Enter path: ' xpath 40 attr = blink | |
</font> | </font> | ||
| | | | ||
Zeile 69: | Zeile 69: | ||
| | | | ||
<font face="Courier New"> | <font face="Courier New"> | ||
− | + | :%DISPLAY path; | |
</font> | </font> | ||
| | | | ||
Zeile 81: | Zeile 81: | ||
| | | | ||
<font face="Courier New"> | <font face="Courier New"> | ||
− | + | :%LET rpath = &RPATH.&XPATH.\; | |
</font> | </font> | ||
| | | | ||
Zeile 93: | Zeile 93: | ||
| | | | ||
<font face="Courier New"> | <font face="Courier New"> | ||
− | + | :%PUT ---&RPATH.---; | |
</font> | </font> | ||
| | | | ||
Zeile 105: | Zeile 105: | ||
| | | | ||
<font face="Courier New"> | <font face="Courier New"> | ||
− | + | :length entry $256; | |
</font> | </font> | ||
| | | | ||
Zeile 111: | Zeile 111: | ||
| | | | ||
<font face="Courier New"> | <font face="Courier New"> | ||
− | + | :infile path length = lrecl; | |
</font> | </font> | ||
| | | | ||
Zeile 117: | Zeile 117: | ||
| | | | ||
<font face="Courier New"> | <font face="Courier New"> | ||
− | + | :input entry $varying256. lrecl; | |
</font> | </font> | ||
| | | | ||
Zeile 123: | Zeile 123: | ||
| | | | ||
<font face="Courier New"> | <font face="Courier New"> | ||
− | + | :put entry; | |
</font> | </font> | ||
| | | | ||
Zeile 135: | Zeile 135: | ||
| | | | ||
<font face="Courier New"> | <font face="Courier New"> | ||
− | + | :%RXDIR(&RPATH.) | |
</font> | </font> | ||
| | | | ||
Zeile 141: | Zeile 141: | ||
| | | | ||
<font face="Courier New"> | <font face="Courier New"> | ||
− | + | :%LEAVE: | |
</font> | </font> | ||
| | | | ||
Zeile 148: | Zeile 148: | ||
<font face="Courier New"> | <font face="Courier New"> | ||
;filename path clear; | ;filename path clear; | ||
+ | </font> | ||
+ | | | ||
+ | |- | ||
+ | | | ||
+ | <font face="Courier New"> | ||
+ | :%LET rpath = ; | ||
</font> | </font> | ||
| | | |
Version vom 3. September 2014, 15:30 Uhr
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 |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
END macro definition with name |