Page 1 of 1

Writing subroutine

Posted: Wed May 03, 2006 10:46 pm
by Ritesh Vikram
I have made a unix script which runs as an after job subroutine in a map. Is there a way around that i write that script in DS itself so that when the map is migrated to some other environment i don't have to carry the burden of importing that script also?

Posted: Wed May 03, 2006 10:57 pm
by ray.wurlod
Is this a DataStage TX question (as implied by your use of the word "map")? If so, please post on the DataStage TX forum.

Posted: Wed May 03, 2006 11:04 pm
by Ritesh Vikram
No it's not a DS TX question, it is related to the Server Edition.

Posted: Thu May 04, 2006 12:28 am
by ray.wurlod
Just had to be sure. If you use Version Control for promotion all you have to is put the script (or a link to it) in any directory you have identified to Version Control as a "versioned folder" and Version Control will look after the migration of the script for you.

You can "write the script in DS" quite happily, as a before-after subroutine, but the programming language has to be DataStage BASIC.

Posted: Thu May 04, 2006 6:15 am
by chulett
'Versioned Folders' need to be in a Project directory. Create a soft link there if your actual location is different.

Posted: Thu May 04, 2006 1:35 pm
by jreddy
If you are asking if we can call the unix shell script as an after job routine, YES, we can do it

go to job properties page..There you will see After-job routine drop down list.. select 'ExecSH' and in the input value text box - give the pathname and name of shell script along with arguments u want to pass to that shell script. ..

You can also use job parameters for path name, shell script name or shell script arguments

Posted: Sun May 07, 2006 2:37 pm
by kiran_418
You have to write a routine in datastage if you are planning to implement your unix job functionality in datastage.
Then you can export that server routine to different projects.

Posted: Mon May 08, 2006 4:53 am
by kumar_s
And what is the functionality that you are trying to replace BASIC Routine instead of Unix script.