× 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.



Hi Chuck,

Thanks! You found the problem! It figures that it was something simple. I thought I'd copied/pasted the code from Scott Klement's example correctly, but obviously not. I changed it from 5i 0 to 10i 0 and without changing anything else, voila:

select * from table(UDTF1(1)) as c

DSPLY OPEN...: 1- 00000 1 1
DSPLY FETCH..: 0 00000 2 1
DSPLY FETCH..: 0 00000 3 1
DSPLY FETCH..: 0 00000 4 1
DSPLY FETCH..: 0 00000 5 1
DSPLY FETCH..: 0 00000 6 1
DSPLY CLOSE..: 1 02000 7 1

I now have a CLOSE event happening.

Re your earlier email, I had the same initial reaction (that "the SQL Graphical Debugger is only for debug of routines written with the LANGUAGE SQL"), but when I got further down in that PDF by Kent Milligan, it stated

"The graphical system debugger, which is part of the IBM Toolbox for Java, lets you debug programs that run on the IBM i operating system. This state-of-the-art debugger includes an integrated call stack window, breakpoint groups, variable monitors and a local-variables display. In addition to the new capabilities, you can use the graphical debugger, without any training, to debug practically any scenario that you can debug using the green-screen interface (STRDBG).
The graphical debugger supports the following IBM Integrated Language Environment® (ILE) languages:

ILE C and C++
ILE RPG
ILE COBOL
ILE CL
Java"

However, thanks to your catching my mistake, I don't have to use the graphical debugger on it yet. But I'm building up to joining a UDTF to a couple of other files, so I'll probably get an opportunity in the near future.

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx <mailto:petercdow@xxxxxxxxx>
pdow@xxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxx>/


On 11/12/2013 9:30 AM, CRPence wrote:
On 12-Nov-2013 08:34 -0800, Peter Dow wrote:
Thanks for the insight; I'll try debugging from another session
tomorrow. I'd debugged it before from the same session, but got tired
of putting in the EV variable-name over and over, so I threw in the
DSPLYs; I'll likely also try your suggestion of DSPLY to a named
msgq. And thanks for catching the missing "L" on the link.

The problem is with the declaration of the CallType. The interface
requires a 4-byte binary integer. However declared as a two-byte binary
integer, the call to CLOSE with x'00000001' *looks like* the call to
FETCH with x'0000'; i.e. the first two-bytes of x'00000001'.



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.