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



This has nothing to do with Java. Your sqlcode is -901 and not -4301. If
it were -4301 THEN it would be Java related. I know this does not answer
the question, but it may keep you from looking in the wrong place.



rpg400-l-bounces@xxxxxxxxxxxx wrote on 03/05/2008 12:19:46 PM:

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.

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

--
This is the RPG programming on the AS400 / iSeries (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.






This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. Unless you are the addressee (or authorized to receive for the addressee), you may not use, copy or disclose to anyone this email or any information contained in this email. If you have received this email in error, please advise the sender by replying to this email, and delete this email immediately. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Western Dental Services, Inc. Finally, the recipient should check this email and any attachments for the presence of viruses. Western Dental Services, Inc. accepts no liability for any damage caused by any virus transmitted by this email.

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.