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



On 21-Dec-2011 14:21 , Mike Wills wrote:
On 06-Dec-2011 12:03 , Mike Wills wrote:

I have been trying to figure out this bug in my .NET program for
the last couple months. For background, it is for signing time
sheets. The .NET program calls a stored procedure that executes a
RPG program that marks the time sheet as signed.

Occasionally, something happens (a couple times per cycle for about
100 employees or so) that causes my program to crash (please avoid
the .NET jokes here). I might be able to handle the bug okay now
that I know what to expect, but I am trying to determine what that
data is and why it is in there.

I ran the following statement:
SELECT
EM_FULL_N, HEX(EMP_COMMENTS), HEX(SUPV_COMMENTS)
FROM MPRTCSP
WHERE EMP_COMMENTS<>'' OR SUPV_COMMENTS<>''

and got the following result (edited for length):

EM_FULL_N HEX HEX
.... 40404040404040....40 00000000000000....00

<<SNIP>>

I would have to look back to see how I am calling them. I thought
they were all called via external stored procedure.

The original post [included\quoted above] did seem to suggest an SQL external procedure LANGUAGE RPGLE had defined the CALL interface. I think that quoted text also may intend to imply that the .NET program fails when the data in column SUPV_COMMENTS of the file MPRTCSP is all hex zeroes.? Anyhow...

Seems plausible from the description of the program flow that the .NET program calls the stored procedure with the NULL value for a passed parameter, but the processing by the RPG which implements the request "that marks the time sheet as signed" is not honoring the passed NULL indicator; that instead of setting a column to the NULL value, whatever data is in the storage for the variable for the parameter that was passed is being written to the field. Of course that assumes several things [so much so, they are easily way off-the-mark], for lack of each: the definition of the stored procedure, the parameter definitions of the RPG program identified by the EXTERNAL NAME, the how\what the RPG program [intends to and] does to the file data including the file definition and declaration [including null capability handling]. A possible flaw in that interpretation is if the .NET program is not ever both getting and setting of the value of the column via that same stored proc?

Regards, Chuck

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.