How to pass parameter in SAS DI?

Reply
Frequent Contributor
Posts: 90

How to pass parameter in SAS DI?

Hi,

I am using SAS Data Integratoe studio.For eg.In source we have

Column Name

Emp_Id

Emp_name

Salary.

In target we have

Emp_Id

Emp_name

Salary,

File_date

When i execute the job,I need to pass value as parameter to file date column(It should automatically ask when i run the job.)

In Data stage we can achieve this by  using '#Date(paramater name)#'

How to achieve tis in SAS DI?

Respected Advisor
Posts: 3,887

Re: How to pass parameter in SAS DI?

DI Studio is used to develop and unit test jobs. For running jobs in a production environment you deploy and schedule the jobs. The jobs are then run in batch. DI Studio is not meant to be used for running jobs manually in a production environment.

Because the jobs are run in batch you can't design for a prompt where you pass a value during run-time. Also this would be technically possible it would be the wrong thing to do.

What you need to do is to somehow retrieve (or calculate) the File_Date (eg. based on a date part in the data source file name). You then store this retrieved value in a SAS Macro variable as SAS Date value and pass it in the expression field of a mapping to the SAS variable File_Date.

So the expression either look like "&File_Date" or if you store a date string in the form DDMonYYYY in the SAS macro variable it could look like "File_Date"d  .

If you need more detailed advise then you will need to give us more detailed information of what you have and what you need.

There are also other ways of how to pass a parameter value to a SAS program and I assume the same is true for DataStage. So the first thing you need to tell us is how should the parameter get passed (eg. by the scheduler calling the .sas file?).

Ask a Question
Discussion stats
  • 1 reply
  • 878 views
  • 0 likes
  • 2 in conversation