Hello,
I have a SQL Statement in SQLRPGLE which Updates a 3 fiels in a file with 30 fields. SQL Statement is as below.
UPDATE TABLE1 SET TXDATE = :SYSDATE, TXTIME = :SYSTIME, SETFLAG = :w_Set, MSG = :w_ERR, Comment = ' ' WHERE ID = :W_ID
This works fine on one iSeries server and throws following error on another server. Both are running V5R4M0. File is not jounaled and not under commitment control. Couldn't understand the problem. Can some one give idea ?
MCH3601 Escape 40 03/09/11 18:06:16.430512 QQQQUERY QSYS *STMT QQQQUERY QSYS *STMT
From module . . . . . . . . : QQQQUERY From procedure . . . . . . : QQQQUERY Statement . . . . . . . . . : 14553 To module . . . . . . . . . : QQQQUERY To procedure . . . . . . . : QQQQUERY Statement . . . . . . . . . : 14553 Message . . . . : Pointer not set for location referenced. Cause . . . . . : A pointer was used, either directly or as a basing pointer, that has not been set to an address.
CPF4204 Escape 50 03/09/11 18:06:16.430736 QQQQUERY QSYS *STMT QQQQUERY QSYS *STMT From module . . . . . . . . : QQQQUERY From procedure . . . . . . : QQQQUERY Statement . . . . . . . . . : 28150 To module . . . . . . . . . : QQQQUERY To procedure . . . . . . . : QQQQUERY Statement . . . . . . . . . : 28150 Message . . . . : Internal failure occurred in query processor. Cause . . . . . : A system failure has occurred in the query processor program. The query definition template number is 1.
Recovery . . . : See the low-level messages. Correct any errors and try your request again. If the problem continues, report the problem (ANZPRB command).
SQL0901 Diagnostic 50 03/09/11 18:06:18.385216 QSQRUN3 QSYS *STMT QSQRUN3 QSYS *STMT
From module . . . . . . . . : QSQUPDAT From procedure . . . . . . : CLEANUP Statement . . . . . . . . . : 25276 To module . . . . . . . . . : QSQUPDAT To procedure . . . . . . . : CLEANUP Statement . . . . . . . . . : 25276 Message . . . . : SQL system error. Cause . . . . . : An SQL system error has occurred. The current SQL statement cannot be completed successfully. The error will not prevent other SQL statements from being processed. Previous messages may indicate that there is a problem with the SQL statement and SQL did not correctly diagnose the error. The previous message identifier was CPF4204. Internal error type 3107 has occurred. If precompiling, processing will not continue beyond this statement.
Recovery . . . : See the previous messages to determine if there is a problem with the SQL statement. To view the messages, use the DSPJOBLOG command if running interactively, or the WRKJOB command to view the output of a precompile. An application program receiving this return code may attempt further SQL statements. Correct any errors and try the request again.
Thanks
Siim
Software/Hardware used:
ASKED:
March 10, 2011 9:25 PM
UPDATED:
March 14, 2011 11:33 PM
Hi Charlie,
I have run the same statement from interactive SQL. It runs fine. It updates the record.
Hi Charlie,
I have run the same statement from interactive SQL. It runs fine. It updates the record.
But I get this error when I run my SQL RPGLE.
Next thing I would check is by going into debug, and check the values of your vaiables.
Interactively, you had actual values, in the RPG, something is not set correctly. I would also guess that your program may be receiving parms and they may not be corrrect. Either one of these two things would cause a a pointer problem.
What OS version is the program compiled for? What is the DB2 group PTF level on the two systems?
Tom
My OS is V5R4M0 and program compiled with Target Release *CURRENT. I don’t have authority to check PTF details. I will check with my Admin and update again.
Thanks.
…Updates a 3 fiels in a file with 30 fields.
If I understand correctly, you’re saying that the file has 30 fields and that your program updates three of those field.
UPDATE TABLE1 SET TXDATE = :SYSDATE, TXTIME = :SYSTIME, SETFLAG = :w_Set, MSG = :w_ERR, Comment = ' ' WHERE ID = :W_IDThat’s the UPDATE statement after a little reformatting. It looks as if it is updating five fields.
Was “3 fields” a typo? Or is it not expected that it’s really five fields?
Tom