SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Two DI Studio jobs sharing the same dynamically updated parameter?

Reply
Frequent Contributor
Posts: 90

Two DI Studio jobs sharing the same dynamically updated parameter?

Is there a way for two DI Studio jobs to share the same parameter? I know I can import a parameter from one job to another, but I need them to be "the same". If I change the parameter in one job, it should also automatically be changed for the other one. The parameter I have in mind would be a very simple numeric one, with a value from 1-10.

Super User
Posts: 5,435

Re: Two DI Studio jobs sharing the same dynamically updated parameter?

Posted in reply to EinarRoed

What do you mean by changing the parameter?

The name, or the (default) value of it?

Parameters are meant to be dynamic, and the value of the parameter is set during run time. How do you set your parameter value?

Data never sleeps
Frequent Contributor
Posts: 90

Re: Two DI Studio jobs sharing the same dynamically updated parameter?

LinusH: I have one job where I've set up a parameter called &delay with the value "2". I then import the parameter into a second job, so that both jobs have identical &delay parameters. The problem is that if I change it from "2" to "3" in one job, it doesn't change in the other. I need to find a way for it to do so.

FredrikE: Thanks, I'll go through the suggestions. Smiley Happy

Super User
Posts: 5,435

Re: Two DI Studio jobs sharing the same dynamically updated parameter?

Posted in reply to EinarRoed

As i mentioned, parameters are mainly set in run time.

Setting default values is primarily for testing in DI. If you don't pass parameters into the job, you could as well set a macro variable in the pre-code.

Is it a parameter you really need? By following Frediks suggestions, you don't need parameters, just use macro variables right off.

parameters are used when calling a job from an outer job, linking variable values to parameters, or if your job is deployed as a Stored Process.

Data never sleeps
Regular Contributor
Posts: 191

Re: Two DI Studio jobs sharing the same dynamically updated parameter?

Posted in reply to EinarRoed

I guess some of these might help you:

- Set the parameter in the autoexec, either directly with %let or by reading a table and assigning the vairable. Then use it in the two jobs.

- Store the parameter in a table and create a macro that read the table and create the parameter. Put the macro in then pre-code of the two jobs.

- Create a macro that define the parameter using %let and add the macro to the pre-code of the two jobs.

I'm sure you can find more solutions, but some of these should do the job....

//Fredrik

Ask a Question
Discussion stats
  • 4 replies
  • 300 views
  • 6 likes
  • 3 in conversation