Search notes:

SAS statements: filename pipe

filename tq84_pip pipe 'ls -l /tmp/*.log';

data _null_;
  infile tq84_pip truncover;
  input  line $256.;
  put    line=;
run;
Github repository about-SAS, path: /programming/statements/filename/pipe/basic.sas

Writing to dataset

The pipe is used to create a data set. Then, proc print prints the dataset.
filename ls_ltr pipe 'ls -ltr /tmp';

%let line_len=100;
data ls_ltr_result;
  length line $&line_len;
  infile ls_ltr length=reclen;

  input line $varying&line_len.. reclen;
run;

proc print data = ls_ltr_result; run;
Github repository about-SAS, path: /programming/statements/filename/pipe/dataset-print.sas

See also

filename
Interaction with the OS
Macro: tq84_shellCmd

Index