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



I changed it to use RPG IO simply due to project dead line. SQL is
wonderful when it works. But when it goes wrong like the one I see, it
becomes a blackbox and is hard to figure out.

Here are some more detail regarding the MCH0601 (Let me know if you need
other info):
1) These blow of SQL codes are running in a Service program.
2) The compiler listing looks like below:
//--------------------------------------------------------------
// copy the EMAILMSG member to a temporary note file in IFS
//-------------------------------------------------------------
begsr cpyEmailMsgMbrToNoteFileInIFS;

//create a temp work file, QTEMP/SVRMLTMP, to house the message
//------------------------------------------------------------
//**** sql
//****rop table QTEMP/SVEMLTMP;
/END-FREE
C Z-ADD 4 SQLER6
C CALL SQLROUTE
C PARM SQLCA
/FREE
//**** sql
//****reate table QTEMP/SVEMLTMP
//**** (TEXT VARCHAR (1000 ) NOT NULL WITH DEFAULT);
/END-FREE
C Z-ADD 5 SQLER6
C CALL SQLROUTE
C PARM SQLCA
/FREE

//copy the EMAILMSG member to a temp work file
//------------------------------------------------------------
myCmd = 'OVRDBF FILE(EMAILMSG) TOFILE(EMAILMSG) MBR(' +
%trim(piMbr) + ') OVRSCOPE(*CALLLVL)';
qcmdexc(myCmd :%len(%trimr(myCmd)));
//**** sql insert into QTEMP/SVEMLTMP
//**** select rtrim(SRCDTA) FROM EMAILMSG;
/END-FREE
C Z-ADD 6 SQLER6
C CALL SQLROUTE
C PARM SQLCA
/FREE

3) The relevent joblog looks like below:
ODP created.
Blocking used for query.
Cursor SQLCURSOR000000003 opened.
1 rows fetched from cursor SQLCURSOR000000003.
1 rows fetched from cursor SQLCURSOR000000003.
1 rows fetched from cursor SQLCURSOR000000003.
1 rows fetched from cursor SQLCURSOR000000003.
1 rows fetched from cursor SQLCURSOR000000003.
Space offset X'0003F1D3' or X'0000000000000000' is outside current limit
for object MSRL3G343APALHC 345777.
Space offset X'0003F1D2' or X'0000000000000000' is outside current limit
for object MSRL3G343APALHC 345777.
Space offset X'FFFFEF37' or X'0000000000000000' is outside current limit
for object MSRL3G343APALHC 345777.
1 rows fetched from cursor SQLCURSOR000000003.
Space offset X'0003F204' or X'0000000000000000' is outside current limit
for object MSRL3G343APALHC 345777.
Space offset X'0003F203' or X'0000000000000000' is outside current limit
for object MSRL3G343APALHC 345777.
Space offset X'FFFFEF6A' or X'0000000000000000' is outside current limit
for object MSRL3G343APALHC 345777.
1 rows fetched from cursor SQLCURSOR000000003.
Space offset X'0003B3D6' or X'0000000000000000' is outside current limit
for object MSRL3G343APALHC 345777.
Space offset X'0003B3D5' or X'0000000000000000' is outside current limit
for object MSRL3G343APALHC 345777.
Space offset X'FFFFB13E' or X'0000000000000000' is outside current limit
for object MSRL3G343APALHC 345777.
1 rows fetched from cursor SQLCURSOR000000003.
Space offset X'0000586B' or X'0000000000000000' is outside current limit
for object MSRL3G343APALHC 345777.
Space offset X'0000586C' or X'0000000000000000' is outside current limit
for object MSRL3G343APALHC 345777.
1 rows fetched from cursor SQLCURSOR000000003.
Space offset X'00005881' or X'0000000000000000' is outside current limit
for object MSRL3G343APALHC 345777.
Space offset X'00005882' or X'0000000000000000' is outside current limit
for object MSRL3G343APALHC 345777.
ODP deleted.

Cursor SQLCURSOR000000003 was closed.

DESCRIBE of prepared statement SQLSTATEMENT000003 completed.

PREPARE of statement SQLSTATEMENT000003 completed.

Drop of Q0T467 in QTEMP complete.


4) When I press F1 then F9 on the MCH0601, I got below:
Message ID . . . . . . : MCH0601 Severity . . . . . . . : 40

Message type . . . . . : Diagnostic

Date sent . . . . . . : 05/14/10 Time sent . . . . . . :
08:25:31


Message . . . . : Space offset X'FFFFB13E' or X'0000000000000000' is
outside
current limit for object MSRL3G343APALHC 345777.

Cause . . . . . : A program tried to set a space pointer, tried to use

storage outside a space, or tried to use an unallocated page in
teraspace.
The space class is X'04'. The space class designates the type of
space:
00-primary associated space (includes space objects).

01-secondary associated space 0.

02-implicit process space for automatic storage.

03-implicit process space for static storage in activation group
mark
X'0000000000000000'.

04-implicit process space for heap identifier X'00000000' in
activation
group mark X'0000000000000000'.


Message ID . . . . . . : MCH0601 Severity . . . . . . . : 40

Date sent . . . . . . : 05/14/10 Time sent . . . . . . :
08:25:31
Message type . . . . . : Diagnostic

From . . . . . . . . . : PALHC CCSID . . . . . . . . :
65535


From program . . . . . . . . . : bzeroeao_Gennaker







Instruction . . . . . . . . : 00000C



To program . . . . . . . . . . : QCPEXPRT

To library . . . . . . . . . : QSYS

To module . . . . . . . . . : QCPEXPRT

To procedure . . . . . . . . : Copy_The_Records

To statement . . . . . . . . : 482




"CRPence" <CRPbottle@xxxxxxxxx> wrote in message
news:<mailman.27904.1273790037.2580.rpg400-l@xxxxxxxxxxxx>...
So are the message details for the SQL cursor, SQL FETCH, and
MCH0601 a secret, or does the /circumvention/ by avoiding the SQL
just render that issue moot, such that there is no longer any
interest in knowing what might have been the problem?

Regards, Chuck

Lim Hock-Chai wrote:
These code are running in a service program. Not sure if this
would place a role in the problem. But anyway, I replaced that
whole sections of code with RPG IO and it works fine now.

Here is the RPG replacement version:
//create a temp work file, QTEMP/SVRMLTMP,
// to house the message
//------------------------------------------------
myCmd = 'DLTF FILE(QTEMP/SVEMLTMP)';
callp(e) qcmdexc(myCmd :%len(%trimr(myCmd)));
myCmd = 'CRTPF FILE(QTEMP/SVEMLTMP) RCDLEN(300)';
qcmdexc(myCmd :%len(%trimr(myCmd)));
open SVEMLTMP;

//copy the EMAILMSG member to a temp work file
//-------------------------------------------------
myCmd = 'OVRDBF FILE(EMAILMSG) TOFILE(EMAILMSG) MBR(' +
%trim(piMbr) + ') OVRSCOPE(*CALLLVL)';
qcmdexc(myCmd :%len(%trimr(myCmd)));
open EMAILMSG;
setll *start EMAILMSG;
read EMAILMSG myMsgRec;
dow not %eof();
mySVEMLTMP.data = myMsgRec.srcdta;
write SVEMLTMP mySVEMLTMP;
read EMAILMSG myMsgRec;
enddo;
close SVEMLTMP;


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.