× 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, All

I am going to attach SQLCODE table .
Please check you code in that and solve it.

Thanks

BirgittaHauser <Hauser@xxxxxxxxxxxxxxx> wrote:
Hi,

If it had been pure RPG you would have get MCH3601, Pointer not set.
You have to define the datastructure as not based.

Also prefix may be a problem.
Sometimes there are also problems when using fields passed in the procedure
interface dirctly.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von Arturo_Duarte@xxxxxxxxxxxxxxx
Gesendet: Wednesday, March 05, 2008 21:20
An: rpg400-l@xxxxxxxxxxxx
Betreff: SQLCODE -901


Hello everyone.

I have a nomain module that uses sql statements to fetch into an array
data structure. When debugging, after executing the fetch statement, the
program is returning sqlcode -901, and sqlstate 58004. The IBM explanation
is "A system error(that does not necessarily preclude the successful
execution of subsequent SQL statements) occurred. SQLSTATE 58004, when
combined with SQLCODE -4301, indicates this meaning for the failure: Java
interpreter startup or communication failed."

I am not using Java in the program. The code in question is in bold below.
Here is the code:

*?Control Options
H Debug(*YES)
H DatFmt(*ISO)
H TimFmt(*ISO)
H NoMain

*?Compile Options
H FixNbr(*Zoned:*InputPacked)
H AlwNull(*UsrCtl)
H Option(*NODebugIO:*SrcStmt)

*Program Prototypes? ----
/Define GetPCTComments
/Include PCTCMNTFPR
/unDefine GetPCTComments

*Stand alone? ----
D maxRows C 5000
D PCTCommentsA e DS extname(PCTCMNTF0)
D occurs(maxRows)
D prefix(a)
D based(oPtrComments)
d rowInputMax S 10U 0 Inz(maxRows)

*Constant? ----
d Successful c const('00')
* general error
d Error c const('01')
* record not found
d notFound c const('02')

PGetPCTComments...
P B Export
DGetPCTComments...
D Pi 2a
D inReqNum 10s 0 const
D oCount 5U 0
D oPtrComments *

/free
monitor;
oCount = 0 ;
Exec Sql Declare c1 Cursor For
(Select * From PctCmntF0 Where reqNum = :inReqNum);
Exec Sql Open c1;
Exec Sql
FETCH FROM c1 FOR :rowInputMax ROWS
INTO :PctCommentsA;
oCount = SQLERRD(3);
Exec Sql Close c1;
If ( oCount <= 0 ) ;
return notfound ;
else ;
return Successful ;
endif ;
on-error ;
return Error ;
endmon ;
/end-free
PGetPCTComments...
P E

Art Duarte

======================================================================

Confidentiality Notice: The information contained in and transmitted with
this communication is strictly confidential, is intended only for the use of
the intended recipient, and is the property of Countrywide Financial
Corporation or its affiliates and subsidiaries. If you are not the intended
recipient, you are hereby notified that any use of the information contained
in or transmitted with the communication or dissemination, distribution, or
copying of this communication is strictly prohibited by law. If you have
received this communication in error, please immediately return this
communication to the sender and delete the original message and any copy of
it in your possession.

======================================================================


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.