1
votes

I would like to read a set of files that all contain a specific string (xxx*.csv). So if my folder has the files below, the code should read in file #1 and #2. 1. xxx_123.csv 2. xxx_456.csv 3. xyz_111.csv

The first part of the filename is known, but the second part is unknown. Anyone know how I can achieve this in SAS Enterprise Guide?

1

1 Answers

2
votes

You can create a wildcard fileref, not sure how to do it interactively in EG, but in Base SAS the code would be similar to the below.

filename wildxxx "/path/xxx*.csv" ;

data readin ;
  infile wildxxx /* + infile options */;
  /* input statement */
run ;