PowerShell & DSJOB

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Never heard of it. Seems to me you should find a PowerShell support forum and ask there. Was it updated recently?
-craig

"You can never have too many knives" -- Logan Nine Fingers
greggknight
Premium Member
Premium Member
Posts: 120
Joined: Thu Oct 28, 2004 4:24 pm

Post by greggknight »

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.
"Don't let the bull between you and the fence"

Thanks
Gregg J Knight

"Never Never Never Quit"
Winston Churchill
cp2098
Premium Member
Premium Member
Posts: 8
Joined: Tue Nov 16, 2010 10:57 am

Post by cp2098 »

Sorry Greg, you missed my point. My datastage server is running on Windows and we are using PowerShell to run the dsjob. The datastage jobs that I am executing is extracting data from various systems and not just SQL Server.
greggknight
Premium Member
Premium Member
Posts: 120
Joined: Thu Oct 28, 2004 4:24 pm

Post by greggknight »

My answer still sticks,
write a korn shell script to execute the DS jobs
and return a value based on -jobstatus

execute IT from powershell.
Its an app so no cmd window is going to open.
"Don't let the bull between you and the fence"

Thanks
Gregg J Knight

"Never Never Never Quit"
Winston Churchill
Post Reply