Hello,
I have 50+ SAS files of different schemas that I need to load and analyze. I created a batch macro to read all the files together and it reads fine (didn't analyze the data completely yet) but all the records are populated with the first filename of the 50 files instead of the file a particular record came from. It is especially important for me to get the filename of all these files for data processing downstream. Please suggest where I am going wrong in the process.
Thank you!
Solved! Go to Solution.
What settings do you have for your action tool and input tool inside the batch macro?
With these settings I got it to work, meaning summarize the record counts by each filename.
All these files have very different fields in each. Is there a way to tell which fields came from a particular file?
Or, can I get a list of fields from each of these 50+ files without creating 50 input data tools?
Appreciate all your help.
Thank you,
Madhavi
Ok, I see the issue.
Your action tool is updating the location of the macro input, but not the name. Thats why they all have the same name.
You want your action tool to look like this, where you are updating the entire input data and not just the location of the file you are opening.
As far as the fields go, the Field Info tool is what you want. It will list the source for all the fields.