Hi,
My job design is like that
I am calculating a date in one job & want to pass that calcuated parameter in shell script whcih would be called in the workflow with Routine ExSH. Shell script is doing nothing but just copy the file from one location to another. As the file name is having date part thats why i want it to pass the paramenter in the shell script.
Is it possible to pass such parameter.
If yes please give me any pointers.
Thanx,
Vinod
How to pass parameter from Datastage Job to shell script
Moderators: chulett, rschirm, roy
-
vinodpatel
- Participant
- Posts: 4
- Joined: Mon Aug 21, 2006 10:23 pm
- Location: Pune
There are various ways that you can do this. How you solve it depends upon exactly where you calculate this date and where you call up the external command.
The easiest solution might be to write this date value to a file (one row, one column) and then you use the contents of this file indirectly in your shell script. This makes things simple and easy.
The easiest solution might be to write this date value to a file (one row, one column) and then you use the contents of this file indirectly in your shell script. This makes things simple and easy.
-
vinodpatel
- Participant
- Posts: 4
- Joined: Mon Aug 21, 2006 10:23 pm
- Location: Pune
Ya I have one separate Job for calulating date which writes into the Hash file.Now I read this file with routine GetParameterFromHash. But how should I pass this value into the shell script. Again I am calling this script through routine ExSH in the workflow.
Flow is like this
1. JobActivity (calling job which calulates date)
2. UserVaraible (retreives value from Hash file:GetParameterFromHash)
3.RoutineActivity(calls shell script : ExSH)
Now how can i pass the value get from GetParameterFromHash to shell scrip?
Also,Please suggest another apporach if its not proper one.
Thank,
Vinod
Flow is like this
1. JobActivity (calling job which calulates date)
2. UserVaraible (retreives value from Hash file:GetParameterFromHash)
3.RoutineActivity(calls shell script : ExSH)
Now how can i pass the value get from GetParameterFromHash to shell scrip?
Also,Please suggest another apporach if its not proper one.
Thank,
Vinod
If you are calling shells through Routine, you can opt for DSExecute.
You can execute the command concatinated witht the required prameter passed to the shell script. Search for DSExecute in BASIC guide or in this forum.
You can execute the command concatinated witht the required prameter passed to the shell script. Search for DSExecute in BASIC guide or in this forum.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
</a>