Hi all.
I would like to know how to pass the job name as a parameter to the SAS DI job.
Please guide me on this
Regards
Kandasamy
Hi,
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.
Milton
Hi,
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
Thanks,
Shiva
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
Hi Kandasamy,
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...
HTH,
Eyal
Hi
Thanks for your reply.
we need to pass the parameter from outside to SAS DI job
Requirement Scenario:
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
Thanks
kandasamy
Hi Kandasamy,
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.
Regards
Hi Kandasamy,
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.
Eyal
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.