Page 1 of 1

Execute Multiple Before Job Commands

Posted: Mon Mar 26, 2007 6:59 am
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

Posted: Mon Mar 26, 2007 7:14 am
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.

Posted: Mon Mar 26, 2007 7:20 am
by Cr.Cezon
Or you can write a before/after subroutine that calls your tcl commads

Posted: Mon Mar 26, 2007 7:33 am
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.

Posted: Mon Mar 26, 2007 7:54 am
by chulett
Oh, come on... you wanted to do it the simple way? Why didn't you say so! :lol:

Posted: Mon Mar 26, 2007 8:32 am
by rameshrr3
Thanks Folks

You guys made it sound so simple uh!






-------
Ramesh

Posted: Mon Mar 26, 2007 8:58 am
by DSguru2B
It is simple. Ask Craig :wink:

Posted: Mon Mar 26, 2007 5:21 pm
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.