SQLRPGLE Error in UPDATE Query

305 pts.
Tags:
AS/400
IBM iSeries
RPG ILE
SQL
SQL statements
SQLRPGLE
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

Copy and paste that SQL statment and run it from an interactive session after STRSQL.
You get a little more help on what your errors can be.

Discuss This Question: 6  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • sim400
    Hi Charlie, I have run the same statement from interactive SQL. It runs fine. It updates the record.
    305 pointsBadges:
    report
  • sim400
    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.
    305 pointsBadges:
    report
  • CharlieBrowne
    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.
    41,430 pointsBadges:
    report
  • TomLiotta
    What OS version is the program compiled for? What is the DB2 group PTF level on the two systems? Tom
    125,585 pointsBadges:
    report
  • sim400
    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.
    305 pointsBadges:
    report
  • TomLiotta
    ...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_ID
    That'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
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following