Adding Multiple script After job Sub Routine

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
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Adding Multiple script After job Sub Routine

Post by sam334 »

Hi All,
Have a quick question.
I need to run two scripts in After job subroutine from Job control.
Once the job is done, first script sends the file to another server and second script should delete the original source file in FTP server.

I have both the scripts. But can I use those in after job sub routine anyway. We always use one script. If I need to use both the scripts, what would be the required way of doing it.

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

Post by chulett »

A couple of thoughts...

Run both with the proper separator between them. For UNIX I would typically use '&&' which means only run the thing on the right if the thing on the left succeeds. Not sure if there is a DOS equivalent but that shouldn't really matter.

Or write a wrapper script that runs the other two and use that one after job.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

&& (and the other pipeline separators) work in DOS too.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Specifically because of the MKSToolkit or natively? I'll have to dust off a DOS tome and see. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Pretty sure natively. Certainly the redirection operators and unconditional pipeline operator (;) are native.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Choose a job you love, and you will never have to work a day in your life. - Confucius
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sweet! Been far too long since I've had to worry about anything of that ilk... thankfully.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sam334
Premium Member
Premium Member
Posts: 145
Joined: Mon Aug 26, 2013 7:42 pm

Post by sam334 »

Worked.... Thanks a lot everyone. Appreciate your help.
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

got ilk?

:lol:
Choose a job you love, and you will never have to work a day in your life. - Confucius
Post Reply