RPG with Embedded SQL needs journaling

15 pts.
Embedded SQL
iseries v5r4
When I try updating data in a PF via embedded SQL I get a message saying I need to turn journaling on..

  *  change dates on a set of records   C/EXEC SQL                             C+ UPDATE ACC02602P                    C+   SET   CSSTR8 = :$NEWSTR,          C+         CSEND8 = :$NEWEND           C+   WHERE CSSTR8 = :$CSSTR8  AND      C+         CSEND8 = :$CSEND8  AND      C+         CSACTV = :$CSACTV  AND      C+         CSRCDT = :$CSRCDT  AND      C+         CSCURN = :$CSCURN           C/END-EXEC                            Message ID . . . . . . :   CPF4328       Severity . . . . . . . :   50       Message type . . . . . :   Escape                                            Date sent  . . . . . . :   06/17/10      Time sent  . . . . . . :   16:28:53                                                                              Message . . . . :   Member ACC02602P not journaled to journal *N.            Cause . . . . . :   Member ACC02602P file ACC02602P in library DEVLIB is not   journaled to journal *N in library *N for commitment definition *DFTACTGRP.     The journal specified is used by commitment definition *DFTACTGRP. If *N   is specified for the journal, the file is not journaled. If the file is a    logical file, all based-on physical files may not be journaled to the same   journal as required by commitment control.                       PLEASE DONT TELL ME TO TURN ON JOURNALING.  THIS EXACT SCENARIO - DIFFERENT PF IS BEING RUN SUCCESSFULLY ON OUR SYSTEM  

Software/Hardware used:
as400 v5r4

Answer Wiki

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

When you compile the program, verify that the parm “COMMIT” is *NONE.


<pre> Specify Value for Parameter COMMIT

Type choice, press Enter.

Commitment control . . . . . . . *CHG
*CHG : Commitment control (COMMIT) – Help :
*ALL : :
*CS : Specifies whether SQL statements in the compiled program :
*NONE : are run under commitment control. Files referred to in :
*RR : the host language source are not affected by this option. :
*UR : Only SQL tables, SQL views, and SQL packages referred to :
*RS : in SQL statements are affected. :
*NC : :
: *CHG or *UR :
: Specifies the objects referred to in SQL ALTER, :
: statements and the rows updated, deleted, and inserted :
: More… :
: F2=Extended help F10=Move to top F11=InfoSeeker :
F3=Exit F5= : F12=Cancel F20=Enlarge F24=More keys :
: :
Function key :……………………………………………………..: </pre>

Discuss This Question: 2  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.
  • TomLiotta
    The answer from PSMurray is essentially correct. You don't show any SET OPTION statement and your UPDATE statement says nothing about the isolation level, so the default isolation level will be used. For a CRTSQLxxx compiled objects, the COMMIT() parameter sets the default. Most likely, your command default is set to COMMIT(*CHG). I.e., it's because you told it that journalling will be used. The real answer is to journal the file and use commitment control. Tom
    125,585 pointsBadges:
  • DiscGolfJunkie
    Another option is placing "with NC" in your SQL statement: From MLPFlock Left Outer Join MLPFlockU On FKCmp = FUCmp And FKLoc = FULoc And FKFarmNo = FUFarmNo And FKYear = FUYear And FKNum = FUNum Left Outer Join MLPFarm On FKCmp = FMCmp And FKLoc = FMLoc And FKFarmNo = FMFarmNo Where FUPrcd between :post_StartDate And :post_EndDate And FUCmp = :post_FlockCmp And FULoc = :post_Location Order by FKCmp, FUPrcd Asc, FUPrsq For Fetch Only With NC;
    10 pointsBadges:

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.

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


Share this item with your network: