Issue with server routines calling teradata database.

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
mintter
Participant
Posts: 1
Joined: Thu Aug 04, 2005 12:36 am

Issue with server routines calling teradata database.

Post by mintter »

Hi,

I am facing an issue with server routines when I trying to migrate from DB2 to Teradata.
Routines with Db2 calls was written in DS 7.5 versions
We are using DS version 8 and changing the routine which calls Teradata version 12 now.

below is the snapshot of initial routine:------------------------------------------
sSQL = 'connect to ':pUKDWDATABASE:' user ':pUKDWUSERNAME:' using ':pUKDWPASSWORD
cmd = 'db2 -x "':sSQL:'"'
if sMSG = '' then sMSG = cmd
Call DSExecute('UNIX',cmd,sOutput,sError)


Below is the snapshot of routines changed to Teradat:
-------------------------------------------------------------
sSQL = ' bteq .logon ':pTDDATABASE:'/':pTDUSERNAME:', ':pTDPASSWORD
if sMSG = '' then sMSG = cmd
Call DSExecute('UNIX',sSQL,sOutput,sError)

It compiles. But it jus hangs up and does not run.
Please let me know if there are any solutions.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Welcome Aboard,
What else are you doing besides just connecting to it. I believe that its logging you in and just waiting for your next input which it never gets. You see this as "the routine is hung".
Try to pass it a sql command along with a quit/terminate statement and see what happens.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

Post by throbinson »

I agree. Can we assume the final tick and a semi-colon are a cut/paste typo?
Post Reply