How to call Shell script from a dstx map?

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
Balkrishna
Participant
Posts: 4
Joined: Wed Sep 20, 2006 12:07 am

How to call Shell script from a dstx map?

Post by Balkrishna »

I have created one shell script on UNIX server (Purge.sh) and i want to run this shell script using Datastage TX (7.5.1) map.

How can i do the same? Thanks for your help in advance. :oops:
Bala
jgibby
Participant
Posts: 42
Joined: Thu Dec 16, 2004 8:48 am

Re: How to call Shell script from a dstx map?

Post by jgibby »

Balkrishna wrote:I have created one shell script on UNIX server (Purge.sh) and i want to run this shell script using Datastage TX (7.5.1) map.

How can i do the same? Thanks for your help in advance. :oops:

Code: Select all

=GET(
	"SHL"
	,"-cli -cmd 'Purge.sh'"
)
John Gibby
"Artificial intelligience is no match for natural stupidity."
Balkrishna
Participant
Posts: 4
Joined: Wed Sep 20, 2006 12:07 am

Re: How to call Shell script from a dstx map?

Post by Balkrishna »

jgibby wrote:
Balkrishna wrote:I have created one shell script on UNIX server (Purge.sh) and i want to run this shell script using Datastage TX (7.5.1) map.

How can i do the same? Thanks for your help in advance. :oops:

Code: Select all

=GET(
	"SHL"
	,"-cli -cmd 'Purge.sh'"
)
John Gibby
Hi John,
First of all, Thanks for your help.
Can you please explain me the meaning of the term -cli, -cmd and SHL ? In short how it will execute ..? It will be great help to me.
Bala
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

I suggest you read the documentation in PDF 1049.pdf - batch_shell adapter.
jgibby
Participant
Posts: 42
Joined: Thu Dec 16, 2004 8:48 am

Post by jgibby »

Ditto. If you are asking about the SHL argument, then you need to review the documentation.

John
"Artificial intelligience is no match for natural stupidity."
aviroops
Participant
Posts: 3
Joined: Wed Jan 19, 2011 3:25 am
Location: Pune

Post by aviroops »

Hi jgibby,

I have implemented your code but it doesn't seem to work.

There is a bit of modification

Code: Select all

=GET( "SHL" , "-cli -cmd" +" test.sh" )
This works fine when you have to execute a script named as "test.sh"
Cheers
Aviroop
Post Reply