Accessing Teradata from Routine

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
bikan
Premium Member
Premium Member
Posts: 128
Joined: Thu Jun 08, 2006 5:27 am

Accessing Teradata from Routine

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

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
harish_s_ampeo
Participant
Posts: 26
Joined: Tue Dec 18, 2007 6:31 am

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

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kdkboy
Participant
Posts: 2
Joined: Sat Jan 10, 2009 8:40 am

Post 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
kdkboy
Post Reply