Macro XAMINE (from Fraktal SAS Programming)
Version vom 29. Januar 2015, 19:26 Uhr von Wolf-Dieter Batz (Diskussion | Beiträge)
Code executed | Function performed |
---|---|
|
Start Macro definition with name and positional parameters xpath and etype |
|
Declare global macro variables for communication with called macros |
|
Declare local macro variables |
|
Open access path to listing of OS directory content of type 'file' |
|
Open access path to listing of OS directory content of type 'dir' |
|
Initiate data step to access OS directory content |
|
Declare length of data field 'entry' |
|
Set pointer to access path 'entries' |
|
Read from 'entries' with variable field length |
|
Write count of entries to macro variable 'ne' |
|
Terminate data step |
|
Initiate data step to access OS directories listing |
|
Declare length of data field 'dir' |
|
Set pointer to access path 'dirs' |
|
Read from 'dirs' with variable field length |
|
Terminate data step |
|
Start macro loop to process entries one by one with loop index 'ie' |
|
Initiate data step without creating a dataset |
|
Read row number 'ie' from dataset 'entries' |
|
Write value from read row to macro variable 'entry' with intermediate name processing |
|
Write value from read row to macro variable 'xentry' |
|
Terminate data step |
|
' to the LOG |
|
Write full path and filename to the LOG |
|
Reset value for macro variable 'dir' |
|
Initiate data step without creating a dataset |
|
Read value from dataset 'dirs' for |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
End Macro definition with name |