Hi All-
Can anybody help me out!!
Requirement:
I need to get the system variables from control-M tool such as Order date,OredrId for any particular datastage job and pass it on to some script
ex : Runanyjob.ksh. as input parameters.
In my case the datastage server and Control-M server are different though.
Regards
Raghu/Sree
Passing on System Variables from control-M tool to a script
Moderators: chulett, rschirm, roy
We use a script like this. We have all parameters in text files that end in .prm. There is a global parameter file and one for each job. There can be one for each parameter. We have a script to populate each of these. The global one is built by all the defaults for all the parameters in every job. The parameter level one is usually for a specific job at run time.
JobName_ParamName.prm
ParamName=ParamValue
These are all fairly simple scripts.
JobName_ParamName.prm
ParamName=ParamValue
These are all fairly simple scripts.
Mamu Kim
Re: Passing on System Variables from control-M tool to a scr
You can do this using AutoEdit Control-M variables. Following are the steps:sreelalpp wrote:Hi All-
Can anybody help me out!!
Requirement:
I need to get the system variables from control-M tool such as Order date,OredrId for any particular datastage job and pass it on to some script
ex : Runanyjob.ksh. as input parameters.
In my case the datastage server and Control-M server are different though.
Regards
Raghu/Sree
1. You have to create Job Type Control-M component. Command type Control-M component my not work with AutoEdit Control-M variables.
2. In the parameter tab of Control-M component you can define PARAM1, PARMAM2 as parameters.
3. Define the values of PARAM1, PARMAM2 using AutoEdit Control-M variables.
4. In your script Runanyjob.ksh accept Control-M varaibles as command line arguments. The vales will be accessible as $1 and $2
5. Pass these vales to DataStage job using dsjob utility.
Hope it helps.
Assume everything I say or do is positive
Re: Passing on System Variables from control-M tool to a scr
By "Job Type Control-M component" do you mean a controlM job which executes a Ds job ?
Is this the only way, because in the controlM window that I have, the parameter tab is inactive.
-Thanks,
Sreelal
Is this the only way, because in the controlM window that I have, the parameter tab is inactive.
-Thanks,
Sreelal
lal
Re: Passing on System Variables from control-M tool to a scr
Yes. I'm using component to avoid confusion with DataStage job.sreelalpp wrote:By "Job Type Control-M component" do you mean a controlM job which executes a Ds job ?
Is this the only way, because in the controlM window that I have, the parameter tab is inactive.
-Thanks,
Sreelal
I'm not sure what you are looking at. If the parameter tab is inactive, I guessing that you would be looking at active job in Control-M ESG console. What it means that job is already scheduled to run. You can still modify this Control-M component but first you will have to right click on it and put it on hold. (You should have permission to put jobs on hold and modify). However changes made to Control-M component in ESG will be lost for next run as it does not update metadata.
If you want to make this change permanent, download this component from ESG to Control-M Desktop, modify it and upload it back to Control-M ESG. The changes will take effect from the next run.
Hope it helps....
Assume everything I say or do is positive