BookmarkSubscribeRSS Feed
stan
Quartz | Level 8

For example, I have the files (within the same directory) named with

human_CDx+CDx+xxh_1way_RM_ANOVA

common fragment in its names.

The inner structure of the files is as follows:

LINE with text

LINE with text

LINE with text

LINES with DATA

LINE with text

LINE with text

LINE with text

LINE with text

LINE with text

2 REPLIES 2
PGStats
Opal | Level 21

INFILE supports simple wildcard characters (both in Windows and Unix) for reading multiple files. Use filename= option to know where each observation comes from, as in

infile ('c:\myfiles\*.*','c:\myotherfiles\abc.dat') filename=whatFile;

PG

PG
stan
Quartz | Level 8

It works! But my intention is to make SAS compute different data sets

stored in '.txt' files located in a directory consequently. One by one.

There is an article at UCLA website:

SAS FAQ: How do I read multiple raw data files with the same structure in one data step?

But I get a big table with directories and data themselves instead of my SAS script

consecutive execusions with different data sets.

How to implement this?

Thanks for any response.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1278 views
  • 0 likes
  • 2 in conversation