The data is dynamically generated by the execution of the OS command 'dir /l/b c:\*.*'.
1 Code Block
DATA STEP Data
Explanation : Configuration of a pipe to the system command 'dir' and reading the resulting text stream to create the 'figfile' table. Each line of the command's output becomes an observation.
Copied!
filename files pipe 'dir /l/b c:\*.*' ;
data figfile ;
infile files pad lrecl=128 ;
input fname $128. ;
run ;
1
filename files pipe 'dir /l/b c:\*.*' ;
2
DATA figfile ;
3
INFILE files pad lrecl=128 ;
4
INPUT fname $128. ;
5
RUN ;
2 Code Block
PROC PRINT
Explanation : Display of the retrieved file list.
Copied!
proc print ;
run ;
1
PROC PRINT ;
2
RUN ;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.