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



These errors just scream "memory corruption! memory corruption!"

Somehow, something in memory is getting corrupt -- Possibly the spot in memory where the address of RHRCT# is stored, or possibly something inside the SETLL routine or the underlying database routine.

Awfully difficult to troubleshoot this from the information we've been given, but... somewhere, somehow, you are either using mismatched parameters, or using a pointer incorrectly, or something like that, and it's corrupting memory. These types of errors are very difficult to diagnose for the simple reason that the code causing the error might have nothing whatsoever to do with the code that's failing. It might even be in a different module or different program.

But, my suggestion is that you start to comb over all of the code called in this job and verify that all of the calls are made with prototypes, that the prototypes match the procedure interfaces (or *ENTRY PLIST) and that nothing is using an out-of-date source member or calling an out of date object.


DSmith@xxxxxxxxxxxxxxxxxxxxx wrote:
Hello All,

I'm having great difficulty with this one RPGLE program. It is called via AJAX (which is working just fine) to return HTML to the web page. When the line below containing Setll is executed, I get the error "Pointer not set for location referenced" and the job ends. This error is followed in the joblog by "Internal failure in compiler or subroutine." I had this program working before, then I changed it to include some embedded SQL and changed it to type SQLRPGLE. The it started blowing up, so I removed the embedded SQL and changed it back to RPGLE. It's still giving me the same errors. I'm compiling with ACTGRP(*NEW), and when the program is in debug, I verified the correct file in the correct library is open. Here's the program source:

FRARHDRL1 UF A E K Disk

// Data structure for Receipt Number Data Area
D RACtlDS ds 1024 DtaAra(RACTL)
D RACtlrct# 964 972S 0 (reformat alpha to numeric data)

/free

RHRCT# = RACtlRct#; (RHRCT#: 9P0 key field in file)
Setll RHRCT# RARHDRL1; (This is the line that errors out)
DoW %Equal(RARHDRL1);
If RHRCT# = *Zeros;
RHRCT# = 1;
Else;
RHRCT# = RHRCT# + 1;
EndIf;
SetLL RHRCT# RARHDRL1;
EndDo;
wkRct# = RHRCT#;

RACtlRct# = RHRCT# + 1;
Out RACtlDS;

/end-free

Thanks,

Donald W. Smith
DSmith@xxxxxxxxxxxxxxxxxxxxx


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.