Page 1 of 1

Accessing Teradata from Routine

Posted: Tue Sep 02, 2008 3:44 am
by bikan
hi I am calling script A from routine

content of Sript A

bteq <<EOF>
.logon uDFGFD/GFG,hkj;
Select Date;
.exit
EOF

Script connects to teradata and execute the query
Routine command is Call DSExecute('UNIX',Script A,Output,Error)
My Question is will Output will contain Only result of Select Date or complete result with messages also and how can I capture status of only SQL statement in routine.

Posted: Tue Sep 02, 2008 4:12 am
by ray.wurlod
Try it first to answer your first question.

If what you want to happen actually happens, then you will have nothing else to do.

Otherwise you may have a minor parsing task to undertake.

Either way, it can be done.

Posted: Wed Jan 07, 2009 8:08 am
by harish_s_ampeo
Hi ,

Even i need to access the teradata database using my routine. Please can u tell me how to achieve this.

Posted: Wed Jan 07, 2009 4:01 pm
by ray.wurlod
I don't believe U is working on a site where they have Teradata. Therefore it is unlikely that U will be able to tell you how to achieve this.

The second person personal pronoun in English is spelled "you", not "u". Please strive for a professional standard of written English on DSXchange, to help those whose first language is not English.

Posted: Sat Jan 10, 2009 10:20 am
by kdkboy
ray.wurlod wrote:I don't believe U is working on a site where they have Teradata. Therefore it is unlikely that U will be able to tell you how to achieve this.

The second person personal pronoun in English is spelled "you", not "u". Please strive for a professional standard of written English on DSXchange, to help those whose first language is not English.
:lol: are you talking to me, ye, my poor english. I once think I never to need speak english, now have to pick up after graduated serveral years

the thing actually not related with teradata, it is universal issue, how to capture error and output in datastage route

this bother me long time, I search forum everywhere, no answer until I read datastage help documents。

in documents, it say, datastage don't check the status in the routine, but if it is a before routine, it would fail datastage job when before routine fail

so solution,
1.put your shell script in before routine, log into log file
2.modify routine, let it check the status, open default after routine in manager