08-22-2017 09:28 AM
I have five tests, each having five test replicate data files of 15,000 rows each. For one test, I have created a process flow that appends the test number, pulls selected rows, creates a categoric variable for sets of these rows, and analyzes the data. I would like to simply rename the source excel files and run this again, for the second test quintet. However, being new to EG 7.1.3, I don't know how to do this. I am not a SAS programmer and much prefer the use of EG.
What is the correct way to bring the EG process flow to bear on the new source data files, please?
08-22-2017 09:50 AM
A bit manual, but you can right-click on each Excel file in the process flow, select Properties, and browse to a different Excel file to replace it. As long as all spreadsheet structure remains the same in the new files, everything downstream should work.
You can also use Tools->Project Maintenance to remap data files within your project. Replace "this" file with "that" file -- that sort of thing.
If this is something that you plan to do often, it might be work converting those Import steps into code that you can repeat and generalize, and then redirect with some simple macro vars. Or create a staging area for your Excel files with consistent names ("File1", "File2", "File3", etc.) and include a step before the flow that copies the source files into the expected file names. You can use the System Command task (custom task you must download) to automate that part, assuming your Excel files are local and your SAS session is remote.
08-22-2017 09:59 AM
Hi @ChrisHemedinger, it would be nice to have the option to use values from prompts in such tasks as the data import/export tasks. Right now I'm tediously exporting a large set of datasets, where parts of the filename are common among groups of datasets/output files.
08-22-2017 10:05 AM
Hi @KurtBremser - good idea! For your case, you might be able to combine a bit of PROC EXPORT or DATA step (depending how you export) and the Copy Files task (which accepts macro vars and wild cards) to create the output you need. Copy Files is on the Tasks->Data menu in EG 7.13 and later.
08-22-2017 10:07 AM
Oh, didn't know that the copy files task can accept macro variables. I thought there would be the same limitations that apply to the import/export tasks (as the logic is mostly in the EG and IOM parts).