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


"Alan Campin" <alan0307d@xxxxxxxxx> wrote in message
news:<mailman.27706.1273704211.2580.rpg400-l@xxxxxxxxxxxx>...
I created my own version and I did not get an error. Sounds like an
IBM
problem unless there is something funky in record 6 since it is
reading the
first five records without a problem

I used a *JOB override level and I don't know if that will effect it.
Also
the message are different (V6R1). Mine just has.

3 rows inserted in SVEMLTMP in QTEMP.
SQL cursors closed.

Given the difference in the messages is it possible you are running
some
other code instead of this?

d
MemberName...
d s 10a
Inz('MEMBER1')

/Free


Exec Sql Drop Table
QTEMP/SVEMLTMP;


Exec Sql Create Table QTEMP/SVEMLTMP
(
Text VarChar(1000 ) Not Null With
Default);


//copy the EMAILMSG member to a temp work
file

//------------------------------------------------------------
ExecuteSystemCommand('OVRDBF FILE(EMAILMSG) TOFILE(EMAILMSG)
MBR('
+
%Trim(MemberName) + ')
OVRSCOPE(*JOB)');
Exec Sql Insert Into
QTEMP/SVEMLTMP
Select Cast(Trim(SRCDTA) As Varchar(1000)) As
Message
From
EMAILMSG;
ExecuteSystemCommand('DLTOVR FILE(EMAILMSG)
LVL(*JOB)');


*InLR =
*On;

Return;

/End-Free



On Wed, May 12, 2010 at 3:09 PM, hockchai Lim
<lim.hock-chai@xxxxxxxxxxxxxxx
wrote:

I'm getting a MCH0601 error on a sql insert statement. Does anybody
know
what I did wrong?
Below is the clip of my code:
exec sql
drop table QTEMP/SVEMLTMP;
exec sql
create table QTEMP/SVEMLTMP
(TEXT VARCHAR (1000 ) NOT NULL WITH DEFAULT);

//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)));
exec sql insert into QTEMP/SVEMLTMP
select rtrim(SRCDTA) FROM EMAILMSG;


Below is the error I see in joblog when running in DEBUG mode.
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 336523.
Space offset X'0003F1D2' or X'0000000000000000' is outside current
limit
for object MSRL3G343APALHC 336523.
Space offset X'FFFFEF37' or X'0000000000000000' is outside current
limit
for object MSRL3G343APALHC 336523.
1 rows fetched from cursor SQLCURSOR000000003.
Space offset X'0003F204' or X'0000000000000000' is outside current
limit
for object MSRL3G343APALHC 336523.
Space offset X'0003F203' or X'0000000000000000' is outside current
limit
for object MSRL3G343APALHC 336523.
Space offset X'FFFFEF6A' or X'0000000000000000' is outside current
limit
for object MSRL3G343APALHC 336523.
1 rows fetched from cursor SQLCURSOR000000003.
Space offset X'0003B3D6' or X'0000000000000000' is outside current
limit



--
This is the RPG programming on the IBM i / System i (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.