Execute Multiple Before Job Commands

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Execute Multiple Before Job Commands

Post by rameshrr3 »

Folks

Yet again im clueless on this one :roll: ; is there a way in which i can execute multiple TCL commnds and an unix command , all using the before-job subroutine feature? Or do i need to create multiple dummy jobs? I know that you can execute multiple unix commnds by delimiting commands with a semicolon';', but how about 2 TCL commands and one unix command , all to be executed before a job runs? Any 'elegant ways of doing so' suggestions?

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

Post by chulett »

It's been awhile but I know it has been discussed here. You'd need to create something called a 'paragraph' from what I recall, something that links together multiple TCL commands. You would then 'run' the paragraph.

A search with the proper keywords should turn something up.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Cr.Cezon
Participant
Posts: 101
Joined: Mon Mar 05, 2007 4:59 am
Location: Madrid

Post by Cr.Cezon »

Or you can write a before/after subroutine that calls your tcl commads
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I concur with Cr.Cezon. Write a small after job sub-routine that has a bunch of DSExecute() commands making all different calls. This way you can have in depth error handling incorporated as well.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Oh, come on... you wanted to do it the simple way? Why didn't you say so! :lol:
-craig

"You can never have too many knives" -- Logan Nine Fingers
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

Thanks Folks

You guys made it sound so simple uh!






-------
Ramesh
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

It is simple. Ask Craig :wink:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can create the paragraph (a series of TCL commands) in the Administrator client's command window. One of these can execute the UNIX command:

Code: Select all

SH -c "<<UNIX command>>"
Once all the TCL commands are contiguous in the command window, multi-select them and save under a name not used for anything else.

That is the name of the paragraph, which can be invoked through the ExecTCL before/after subroutine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply