before-job subroutine execSH

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
mctny
Charter Member
Charter Member
Posts: 166
Joined: Thu Feb 02, 2006 6:55 am

before-job subroutine execSH

Post by mctny »

Can we run two commands consecutively in one line ( in before-job subroutine for the execSH)?
sandeepgs
Participant
Posts: 87
Joined: Wed Jul 02, 2008 12:22 am

Re: before-job subroutine execSH

Post by sandeepgs »

Yes We can as mentioned below.

<First script> && <Second script>
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As noted, any kind of valid command separator can be used. That && one does a status check, the second command is only executed if the first one succeeds. A semi-colon would be unconditional.
Last edited by chulett on Wed May 04, 2011 3:17 pm, edited 1 time in total.
-craig

"You can never have too many knives" -- Logan Nine Fingers
mctny
Charter Member
Charter Member
Posts: 166
Joined: Thu Feb 02, 2006 6:55 am

Post by mctny »

Thanks to you both. it works
Post Reply