billblinn Posted June 8, 2007 Report Share Posted June 8, 2007 Earlier I asked about handling exceptions, but I guess that was a question without an answer. I may now have the answer, but the answer has generated another question. I have a macro that needs to poll data from about 100 retailers. If the process fails on retailer 99, the macro would start with retailer 1 on the next run. So now I think I might operate it this way: A scheduled macro creates a text file containing the number 1. A second scheduled macro opens the file that contains 1 and stores that to a variable. The macro then opens a CSV file with information about all 100 retailers. The macro processes the information for the first retailer. Before stopping, the macro updates the file with the counter to 2. As soon as the second macro finishes, I want it to start again on the next iteration. There must be an easy way to do this, but I don't see it. Hoping this third question is the one that will attract an answer .... Thanks! Quote Link to comment Share on other sites More sharing options...
kevin Posted June 8, 2007 Report Share Posted June 8, 2007 In the folder where the Macro Express program files are installed there is a macro file names Samples.mex. In this macro file there is a macro named Counter from Run to Run. This demonstrates storing a numeric value when the macro runs and reading that numeric value the next time it runs. Use this as an example. Use the variable in the 'Start Processing Record' field of the ASCII File Begin Process command. Quote Link to comment Share on other sites More sharing options...
billblinn Posted June 8, 2007 Author Report Share Posted June 8, 2007 Thanks! I knew I had seen something somewhere regarding how to do this; that's probably where it was. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.