proc call in bteq ansi mode error

Database
Enthusiast

proc call in bteq ansi mode error

I'm trying to call a procedure via bteq but I keep getting a:

*** Error 3722 Only a COMMIT WORK or null statement is legal after a DDL Statement.



Here is my code:

prvcy_call () { bteq
.set session transaction ansi;
$(cat $HOME/.tdlogon)
DATABASE db;
$1
.LOGOFF;
.QUIT;
.EXIT
}

prvcy_call "CALL PPROC.procedureAbcd (
'p1',
'p2',
'p4',
'p4' ;"



not sure whats wrong as it works in sql assistant..

I've tried this too:

prvcy_call "CALL PPROC.procedureAbcd (
'p1',
'p2',
'p4',
'p4' ;

COMMIT;"



but get the same error

2 REPLIES
Senior Apprentice

Re: proc call in bteq ansi mode error

You need to COMMIT the DATABASE command :-)

Teradata Employee

Re: proc call in bteq ansi mode error

Thanks dnoeth, as usual!