Call DSExecute

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
chowdary
Participant
Posts: 38
Joined: Thu Jun 23, 2005 11:25 am

Call DSExecute

Post by chowdary »

Hi

I am using this function in one of my routine to send an email with an attachment "Call DSExecute(ShellType, Command, Output, SystemReturnCode)"

this is my syntax in the routine

Call DSExecute("UNIX",'/usr/bin/uuencode filename filename|/usr/bin/mailx -s "SUBJECT" "you@you.com,me@me.com"','Output','SystemReturnCode')

when i hardcoded the file name and email address everything is working fine, but when i try to pass filename and email address as arguments it is not sending the email.

I am using DataStage 7.1

Is there any way to pass the filename and email address as parameters.

Please throw some suggestions.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

The problem is a common one. The issue is that your command is being stripped of the double quotes. The DSExecute API has issues when you try to do what you're doing.

The recommendation is to use a shell script that does all of the steps that you need, with the variable information passed as arguments to the script. Worst case, write the arguments to a text file and use indirection to feed the arguments to the script.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
chowdary
Participant
Posts: 38
Joined: Thu Jun 23, 2005 11:25 am

Post by chowdary »

Thanks for the reply, I can't use the Shell Script due to some internal problems (as the unix stuff maintained by some other group). They want to do with in the DataStage with out using Shell Script.

I am wondering is there any way to solve this problem with out using the Shell Script.Please throw some suggestions.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

kcbland wrote:Worst case, write the arguments to a text file and use indirection to feed the arguments to the script.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply