Warning message when using Dynamic cursor -

Database
Enthusiast

Warning message when using Dynamic cursor -

Hi,

I am trying to executed a procedure having dynamic cursor which returning result set from a unix script.

Whenever i run the script, it give a warming message  as below

*** Procedure has been executed.

*** Warning: 3212 The stored procedure returned one or more result sets.

Can you please let me know how to suppress this warning, which is causing issue for the downstream...

Tags (3)
6 REPLIES
Senior Apprentice

Re: Warning message when using Dynamic cursor -

Hi Ganesan,

just switch it off if BTEQ returns an errorlevel greater zero to the shell:

.SET ERRORLEVEL 3212 SEVERITY 0;

Dieter

Enthusiast

Re: Warning message when using Dynamic cursor -

Dieter, Thanks for your inputs,

Is there any way to suppress at the procedure level.

Thanks in advance,

Ganesan K

Senior Apprentice

Re: Warning message when using Dynamic cursor -

Hi Ganesan,

in a SP simply add a CONTINUE HANDLER.

Dieter

Enthusiast

Re: Warning message when using Dynamic cursor -

Thanks dnoeth!!!

Enthusiast

Re: Warning message when using Dynamic cursor -

Dear Dnoeth, 

Still we get the same warning msg:

BTEQ -- Enter your SQL request or BTEQ command:

.SET ERRORLEVEL 3212 SEVERITY 0;

CALL file_count(81);

.SET ERRORLEVEL 3212 SEVERITY 0;

 BTEQ -- Enter your SQL request or BTEQ command:

CALL file_count(81);

 *** Procedure has been executed.

 *** Warning: 3212 The stored procedure returned one or more result sets.

 *** Total elapsed time was 19 seconds.

 *** ResultSet# 1 : 1 rows returned by "FILE_COUNT".

 count_samp

-----------

          0

I tried to use continue handler , even though i am getting the same warning msg.

Can u please guide.

Senior Apprentice

Re: Warning message when using Dynamic cursor -

Hi Ganesan,

sorry, i was wrong, of course you can't handle that specific warning within the SP itself.

But when you set the ERRORLEVEL to zero the BTEQ job will also report a zero return code to the shell.

Dieter