Macro XDIR (from Fraktal SAS Programming): Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
K |
K |
||
Zeile 19: | Zeile 19: | ||
| | | | ||
;%IF %LENGTH(&XPATH.) = 0 %THEN %DO; | ;%IF %LENGTH(&XPATH.) = 0 %THEN %DO; | ||
− | | | + | |Define branch when parameter ''xpath'' is not supplied. |
|- | |- | ||
| | | | ||
;%WINDOW path | ;%WINDOW path | ||
− | | | + | |Start definition of pop-up window. |
|- | |- | ||
| | | | ||
: irow = 20 rows = 14 icolumn = 30 columns = 64 | : irow = 20 rows = 14 icolumn = 30 columns = 64 | ||
− | | | + | |Specify position and size of window. |
|- | |- | ||
| | | | ||
: #4 @5 'Enter path: ' xpath 40 attr = underline | : #4 @5 'Enter path: ' xpath 40 attr = underline | ||
− | | | + | |Specify constant text shown, parameter name to be populated and attributes. |
|- | |- | ||
| | | | ||
; ; | ; ; | ||
− | | | + | |Terminate pop-up window definition statement. |
|- | |- | ||
| | | | ||
:%DISPLAY path; | :%DISPLAY path; | ||
− | | | + | |Open pop-up window. |
|- | |- | ||
| | | | ||
;%END; | ;%END; | ||
− | | | + | |Finalize branch definition for empty parameter ''xpath''. |
|- | |- | ||
| | | | ||
;filename path pipe "dir /b ""&XPATH.""" lrecl = 256; | ;filename path pipe "dir /b ""&XPATH.""" lrecl = 256; | ||
− | | | + | |Define text data stream with type '''''pipe''''' and logical record length. |
|- | |- | ||
| | | | ||
;data _NULL_; | ;data _NULL_; | ||
− | | | + | |Initiate data step run group. |
|- | |- | ||
| | | | ||
:length entry $256; | :length entry $256; | ||
− | | | + | |Specify length in byte for character field ''entry''. |
|- | |- | ||
| | | | ||
:infile path length = lrecl; | :infile path length = lrecl; | ||
− | | | + | |Open text data stream ''path''. |
|- | |- | ||
| | | | ||
:input entry $varying256. lrecl; | :input entry $varying256. lrecl; | ||
− | | | + | |Specify structure of data stream ''path''. |
|- | |- | ||
| | | | ||
: put entry; | : put entry; | ||
− | | | + | |Write value from field ''entry'' to the SAS LOG screen. |
|- | |- | ||
| | | | ||
;run; | ;run; | ||
− | | | + | |Terminate data step run group. |
|- | |- | ||
| | | | ||
;filename path clear; | ;filename path clear; | ||
− | | | + | |Close text data stream. |
|- | |- | ||
| | | |
Version vom 4. August 2014, 13:26 Uhr
Code executed | Function performed |
---|---|
|
Start macro definition with name and positional parameter xpath. |
|
Define branch when parameter xpath is not supplied. |
|
Start definition of pop-up window. |
|
Specify position and size of window. |
|
Specify constant text shown, parameter name to be populated and attributes. |
|
Terminate pop-up window definition statement. |
|
Open pop-up window. |
|
Finalize branch definition for empty parameter xpath. |
|
Define text data stream with type pipe and logical record length. |
|
Initiate data step run group. |
|
Specify length in byte for character field entry. |
|
Open text data stream path. |
|
Specify structure of data stream path. |
|
Write value from field entry to the SAS LOG screen. |
|
Terminate data step run group. |
|
Close text data stream. |
|
END macro definition with name |