09-12-2013 07:19 AM
I am using SAS Data Integratoe studio.For eg.In source we have
In target we have
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?
09-12-2013 08:17 AM
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?).