Running a project with different parameters / automatically /

Reply
Occasional Contributor
Posts: 5

Running a project with different parameters / automatically /

Hi all,

I would like to run a project only once in EQ, where list of parameters are already embedded and after the first project run (first loop) it starts again the whole projects and step into the next iteration [parameter combination].


Basically, I am using a 18 months time frame for 6 other parameters (country, product etc). My aim would be to move the timeframe one by one (16 times in total) with each parameters. (6*16 = 96 runs) For this, I am looking for a method which goes back to the begining and restarts the project with the next parameter combination.

Hope it makes sense.

All the helps are very appreciated.

Many thanks,
Andras

Occasional Contributor
Posts: 5

Re: Running a project with different parameters / automatically /

If you could just show me the way where shall I start that would be nice! I can Google it for myself. To be honest, I already tried all of the keywords which I had thought could be useful in finding the answer.

PROC Star
Posts: 1,322

Re: Running a project with different parameters / automatically /

I suggest you ask this in the Enterprise Guide forum (assuming you mean EG, not EQ?) 

In  SAS code, this sounds like potentially a macro looping solution (or better yet just a by-group processing solution).

But I'm not sure how to automate running a project/process flow.  Guess it would probably mean some scripting, like:

http://support.sas.com/resources/papers/proceedings12/298-2012.pdf

Occasional Contributor
Posts: 5

Re: Running a project with different parameters / automatically /

Yes, I meant EG. Thanks for the whitepaper, and for the forum suggestion. I will have a look both.

Occasional Contributor
Posts: 6

Re: Running a project with different parameters / automatically /

I would do this project in the following manner. I am not an EG user, so not sure if my approach will work.

1) Define a dataset with all variables for your project and will all values. In addition, you define variable Used. It is 0 initially, and set to 1 once a parameter combination has been used.

2) To begin a trial, access the database:

DATA _NULL_; SET MYPARAMS;

IF (^USED) THEN DO;

CALL SYMPUT("_arg1",myvalue);

CALL SYMPUT("_key",mykey);

QUIT;

END;

run;

%_myprocess(mstarg1=&_arg1);

3) To mark as done:

DATA MYPARAMS;

SET MYPARAMS;

if (mykey = &_key) then used=1;

run;

4) Put it in a big macro loop and off you go. You can run a number of processes in parallel, although there may be collisions.

5) Use of MODIFY for the last step is better.

Occasional Contributor
Posts: 5

Re: Running a project with different parameters / automatically /

Posted in reply to PaulAThompson

Thanks for your message. That is a good way for storing and calling the different parameters, however, my project is not only one macro, so it is a process flow. My real problem is how to add a piece of code at the end, which reruns the project from the beginning.

Occasional Contributor
Posts: 6

Re: Running a project with different parameters / automatically /

If I remember correctly, you can use EG to generate native SAS code. Generate the code, turn it into a big macro, and you can use my approach.

Ask a Question
Discussion stats
  • 6 replies
  • 341 views
  • 0 likes
  • 3 in conversation