PowerShell & DSJOB
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 120
- Joined: Thu Oct 28, 2004 4:24 pm
I assume you are using powershell because you are using SQL server and you want to know when the job completes so that you can execute something on SQL server afterwards?
I don't know how you are executing your dsjob commands, but I would write a script.ksh on the datastage server, thats a korn shell script to execute my Datastage jobs. set a return code for completion status success or failure.
Then I would execute that script from powershell. Then in powereshell based on the return code you can fork your app.
But what I do is write a job which inserts a record into a SQL table when the batch is done indicating completion. An insert trigger then schedules all my sql jobs which need to run after the load. Building cubes, reports etc.
We use this type of functionality accross over 200 sql servers.
I don't know how you are executing your dsjob commands, but I would write a script.ksh on the datastage server, thats a korn shell script to execute my Datastage jobs. set a return code for completion status success or failure.
Then I would execute that script from powershell. Then in powereshell based on the return code you can fork your app.
But what I do is write a job which inserts a record into a SQL table when the batch is done indicating completion. An insert trigger then schedules all my sql jobs which need to run after the load. Building cubes, reports etc.
We use this type of functionality accross over 200 sql servers.
"Don't let the bull between you and the fence"
Thanks
Gregg J Knight
"Never Never Never Quit"
Winston Churchill
Thanks
Gregg J Knight
"Never Never Never Quit"
Winston Churchill
-
- Premium Member
- Posts: 120
- Joined: Thu Oct 28, 2004 4:24 pm