Desktop productivity for business analysts and programmers

How Do I Change Source Excel Files So I Don't Have To Repeat A Complex Process Flow?

Reply
Occasional Contributor
Posts: 5

How Do I Change Source Excel Files So I Don't Have To Repeat A Complex Process Flow?

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?

Community Manager
Posts: 3,015

Re: How Do I Change Source Excel Files So I Don't Have To Repeat A Complex Process Flow?

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.

Super User
Posts: 8,054

Re: How Do I Change Source Excel Files So I Don't Have To Repeat A Complex Process Flow?

Posted in reply to ChrisHemedinger

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Community Manager
Posts: 3,015

Re: How Do I Change Source Excel Files So I Don't Have To Repeat A Complex Process Flow?

Posted in reply to KurtBremser

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.

Super User
Posts: 8,054

Re: How Do I Change Source Excel Files So I Don't Have To Repeat A Complex Process Flow?

Posted in reply to ChrisHemedinger

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).

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 4 replies
  • 101 views
  • 0 likes
  • 3 in conversation