T7658 error

Database
N/A

T7658 error

Hi,
consider this stored procedure:

create PROCEDURE sp_b(INOUT io_retcd INTEGER)
BEGIN
SET io_retcd=-70;
END;

From sql assistant,
call sp_b(30) --returns '-70' in the output and is good

1. The following stored procedure

create PROCEDURE sp_a()
BEGIN
call sp_b(30);
END;

fails to be created/replaced with error:
SPL1027:E(L3), Missing/Invalid SQL statement'E(5492):The argument for an INOUT/OUT parameter 'io_retcd' is invalid.'

2. When i modify sp_a() to

creates PROCEDURE sp_a()
BEGIN
declare v_tmpcd integer;
SET v_tmpcd = 30;
call sp_b(:v_tmpcd);
END;

It creates okay, however the call to sp_a from sql assistant now fails:
call sp_a() --from Sql assistant
fails with error:
7658: sp_b:RTSLMain:Translation failed for Account with return code (6706).

Any help would be highly appreciated.
Thanks,
-srinivas yelamanchili
2 REPLIES

Re: T7658 error

The error for scenario (1) is valid, you need to pass a host variable to bind the o/p value (in the case of SQL assistant, it was automatically taking care of it).

I am not sure why (2) errors while executing, I could do execute it with out any issues.

If this is the original procs that is causing the issue, you might want to try check with GSC.
N/A

Re: T7658 error

Yeah, 1) is a valid error,
when calling from another stored procedure, it has to be a host variable to store the out result

for 2) it works ok on TD12 express edition on my windows XP.
However the same code fails on the our office Teradata DB. It was recently upgraded from V2R6.1 to 12
I don't think i had this issue before the upgrade. May have to open a ticket with NCR.

6706 – The string contains an untranslatable character

Thanks,
-srinivas