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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 872 views
  • 0 likes
  • 2 in conversation