05-23-2012 01:31 AM
What version of DI Studio are you using? If I recall there's a macro variable named etls_jobname if I got it right. Try to check the generated code of your DI job.
05-23-2012 07:43 AM
Check this link to create parameter jobs in SAS DI.
and check the global macro variable ...Hope it helps..
GLOBAL JOBID A5YZWODR.BT000671
GLOBAL IOMSERVER SASApp
GLOBAL _ARMAPNM "SAS Data Integration Studio"
GLOBAL ETLS_STARTTIME 23MAY12:16:36:23
GLOBAL ETLS_JOBNAME ParameterJob
05-23-2012 12:57 PM
Thanks for your inputs
I have gone through the link and it is not fulfil my requirement
My requirement is, i need to build an user defined audit table
My jobs are running parallelly, all the jobs are assign to the one system audit table and records are getting inserted into it. I am having user defined audit where i need to pull the data from the system audit table and insert to the user defined audit table, so that i need to pass the job name and pick the records from the system audit table
05-25-2012 03:35 AM
I just verified the previous replies you got and in the generated SAS code you have the "etls_jobName" macro variable which contains the current job name. So, you do not need to define a parameter for this as it is auto-generated for you in the code. You can use this macro variable anywhere you like - including adding it to an audit table...
05-29-2012 02:58 PM
Thanks for your reply.
we need to pass the parameter from outside to SAS DI job
1) we have table (say AUDIT_TABLE) which has JOB_NAME column and other attributes (around 10 job_names records in one dataset)
2) our requirement is to fetch all the attribute details from AUDIT_TABLE for a particular job_name
3) need to design a job which will fetch all the attributes from the AUDIT_TABLE for a single job_name and load to the other attribute details to some other table
Clarification/Suggestion we required on below points
1) how to pass a parameter to sas job (passing parameter from one job to other job)
2) can it be achivable through any schedular program, if so please help us
05-29-2012 09:44 PM
Did I get the flow of your scenario correctly that for each record in your audit table contains a job name and some attributes and then the job will be executed with the parameters set for that record?
What I'm thinking is that you have a main job where which loops and reads each record in the audit table and then use %include to reference the sas file of that job.
Sorry if I didn't understand correctly what you are trying to attain.
05-30-2012 11:03 AM
1. You can pass parameters from the scheduler to the DI job using the SYSPARM command line option. You get the value of the SYSPARM into a SAS macro variable called also SYSPARM. You can then use it as you want.
2. Not sure if this is relevant or not but you can use the Data Integration loop transformation to read the values of a table (audit table) and run another DI job each time passing it the current row value from the table as a parameter.