× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



All

I find the problem , in the program i set the sqlstate immediately but this must be done aftert the first call


Thanks to all




Basilio MERLINO
Mobile: +39-3484152040



Il 15/04/2020 10:52, Merlino, Basilio (NissanContractor) ha scritto:

Dear all

I have created the following UDTF that should be return always one line with 4 output field.

Unfortunately when i try to invoke it


SELECT *
FROM table(Get_Listino_Veicoli( 'J60' , '5' , 'AS' , '17'
, 'RT' , 'KAD' , 'G' , 'P' , current date))


even if the output field are populated (i see it with debug) sql come back with msg "No data selected for output".

no data is shown


Can someone have an idea why it's happen and what's is wrong,

Operating system version is V7R3M0


Thanks to all for your support


Basilio Merlino



CREATE FUNCTION ITTOOL/Get_Listino_Veicoli(
lineaprodotto char(3) ,
bodystyle char(1) ,
serie char(2) ,
cilindrata char(2) ,
optionpack char(2) ,
coloreesterno char(3) ,
coloreinterno char(1) ,
tipolistino char(1) ,
datavalidita date )
RETURNS TABLE (
ListinoModelloBase numeric(9 , 2) ,
ListinoOptional numeric(9 , 2) ,
ListinoColoreInterno numeric(9 , 2) ,
ListinoColoreEsterno numeric(9 , 2))
EXTERNAL NAME 'ITTOOL/RTVLISVEI(RTVLISVEI)'
LANGUAGE RPGLE
PARAMETER STYLE DB2SQL
NO SQL
NOT DETERMINISTIC

DISALLOW PARALLEL
NOT FENCED


RPG PROCURE INPUT


p RtvLisVei...
p b EXPORT
d RtvLisVei...
D pi
D* Definisce parametri INPUT
D glineaprodotto...
D 3 const
D gbodystyle...
D 1 const
D gserie...
D 2 const
D gcilindrata...
D 2 const
D goptionpack...
D 2 const
D gcoloreesterno...
D 3 const
D gcoloreinterno...
D 1 const
D gtipolistino...

D 1 const
D gdatavalidita...
d d const
D* Definisce parametri OUTPUT
D glistinoModelloBase...
D 9s 2
D gListinoOptional...
D 9s 2
D gListinoColoreInterno...
D 9s 2
D gListinoColoreEsterno...
D 9s 2
* null indicator per parametri di input e output
D n_glineaprodotto...
D 5i 0
D n_gbodystyle...
D 5i 0
D n_gserie...
D 5i 0

D n_gcilindrata...
D 5i 0
D n_goptionpack...
D 5i 0
D n_gcoloreesterno...
D 5i 0
D n_gcoloreinterno...
D 5i 0
D n_gtipolistino...
D 5i 0
D n_gdatavalidita...
d 5i 0
D n_glistinoModelloBase...
D 5i 0
D n_gListinoOptional...
D 5i 0
D n_gListinoColoreInterno...
D 5i 0
D n_gListinoColoreEsterno...
D 5i 0

d sql_state 5
d Function 517 varying const
d Specific 128 varying const
d ErrorMsg 1000 varying
d CallType 10i 0 const


SOURCE


select;
when CallType = CALL_OPEN;
......

when CallType = CALL_FETCH;
gDataListinocymd = %dec(%date(S8LXDS:*ISO):*CYMD);
chain (glineaprodotto:
gbodystyle:
gserie :
gcilindrata :
gDataListinocymd) snlba0l1;
// MODELLO BASE
if %found(SNLBA0L1);
if gTipoListino = 'D';
gListinoModelloBase = BUTJPR;
elseif gTipoListino = 'P';
gListinoModelloBase = BUTGPR;
elseif gTipoListino = 'C';
gListinoModelloBase = BUTHPR;
EndIf;
else;
gListinoModelloBase = 0;
EndIf;
// COLORE ESTERNO

......


sql_state = '02000';
when CallType = CALL_CLOSE;
sql_state = '02000';
CLOSE *ALL;
endsl;
return;




--


Basilio MERLINO
Mobile: +39-3484152040






***********************************************************************************************************
CONFIDENTIALITY NOTICE

This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information.

If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify us by email to email.security@xxxxxxxxxxxxxxxxx<mailto:email.security@xxxxxxxxxxxxxxxxx> with a copy of this message. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. NISSAN EUROPE and any of its subsidiaries each reserves the right to monitor all e-mail communications through its networks.

NISSAN EUROPE is neither liable for the proper, complete transmission of the information contained in this communication nor any delay in its receipt. This email was scanned for the presence of computer viruses. In the unfortunate event of infection NISSAN EUROPE does not accept liability.

Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them.

***********************************************************************************************************


***********************************************************************************************************
CONFIDENTIALITY NOTICE

This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information.

If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify us by email to email.security@xxxxxxxxxxxxxxxxx with a copy of this message. You must not, directly or indirectly, use, disclose, distribute, print or copy any part of this message if you are not the intended recipient. NISSAN EUROPE and any of its subsidiaries each reserves the right to monitor all e-mail communications through its networks.

NISSAN EUROPE is neither liable for the proper, complete transmission of the information contained in this communication nor any delay in its receipt. This email was scanned for the presence of computer viruses. In the unfortunate event of infection NISSAN EUROPE does not accept liability.

Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them.

***********************************************************************************************************

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.