DSRoutine

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

narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Check if this works
Execute_Command_12.$CommandOutput=0 (Link1)
Execute_Command_12.$CommandOutput=1 (Link2)

If it does not work try
Execute_Command_12.$CommandOutput<1>=0 (Link1)
Execute_Command_12.$CommandOutput<1>=1 (Link2)
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

I could just see that you have mentioned "*** No output from command *** ", so check the command that been executed from DS Director, and execute the same command from command line. By some chance expected paramter might not be passed.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

I am getting the following log in the director:

Executed: cat /Ascential/DataStage/Projects/filename
Reply=0
Output from command ====>
0

Executed command: /Ascential/DataStage/Projects/sendmail_Jseq_Routine_Test76201_4368.sh
*** No output from command **
Pradeep Kumar
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

Looks like you are getting the output. i.e 0
Change the contents of your filename manually to say 1
Run your execute command
You should get

Output from command ====>
1
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

Yes Narasimha,

I am getting 1
Pradeep Kumar
narasimha
Charter Member
Charter Member
Posts: 1236
Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY

Post by narasimha »

narasimha wrote:Check if this works
Execute_Command_12.$CommandOutput=0 (Link1)
Execute_Command_12.$CommandOutput=1 (Link2)

If it does not work try
Execute_Command_12.$CommandOutput<1>=0 (Link1)
Execute_Command_12.$CommandOutput<1>=1 (Link2)
Try these, and see if you get results.
Narasimha Kade

Finding answers is simple, all you need to do is come up with the correct questions.
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

one intersting thing is happening when I mention the Trigger condition as you mentioned in first set.
Execute_Command_12.$CommandOutput=0
Execute_Command_12.$CommandOutput=1

ie" I am not getting any email"
I gave the output links to 2 notification activities. I am not getting nay email now.

Previosuly when I used "
Execute_Command_12.$CommandOutput<>0 (Link2)

I used to get emails.
Pradeep Kumar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As I've already mentioned twice now, you'll need to use the second syntax in the previous post. Output from a command execution is returned in a dynamic array and the Field Marks are messing you up. If you check the first array element by adding <1> to the end of the variable, you'll just get the '0' or the other numbers you are expecting.

And I suggest you stick with these checks based on your previous comments:

Code: Select all

Execute_Command_12.$CommandOutput<1>=0 (success link) 
Execute_Command_12.$CommandOutput<1>#0 (failure link)
Of course, you could use an Otherwise trigger for the failure link which would be my preferred methodology.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

Thanks all of you for your ideas.

I got the answer with the second choice mentioned by Narasimha and Criag.

Thx once again
Pradeep Kumar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Then please mark the topic as Resolved.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply