Writing subroutine

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
Ritesh Vikram
Participant
Posts: 8
Joined: Wed Mar 01, 2006 11:16 pm

Writing subroutine

Post 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?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Ritesh Vikram
Participant
Posts: 8
Joined: Wed Mar 01, 2006 11:16 pm

Post by Ritesh Vikram »

No it's not a DS TX question, it is related to the Server Edition.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
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 »

'Versioned Folders' need to be in a Project directory. Create a soft link there if your actual location is different.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jreddy
Premium Member
Premium Member
Posts: 202
Joined: Tue Feb 03, 2004 5:09 pm

Post 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
kiran_418
Participant
Posts: 40
Joined: Tue Feb 22, 2005 11:12 am

Post 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.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

And what is the functionality that you are trying to replace BASIC Routine instead of Unix script.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply