|
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 IBMexplanation
is "A system error(that does not necessarily preclude the successfulJava
execution of subsequent SQL statements) occurred. SQLSTATE 58004, when
combined with SQLCODE -4301, indicates this meaning for the failure:
interpreter startup or communication failed."below.
I am not using Java in the program. The code in question is in bold
Here is the code:list
*?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
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 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.