ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

ENDJRNPF with ENDCMTCTL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ENDJRNPF with ENDCMTCTL

    Dear Expert

    Psuedo

    STRJRNPF FILE(*LIBL/FILE) JRN(HLIB/JRN)
    STRCMTCTL LCKLVL(*CHG) CMTSCOPE(*JOB)
    CALL PROGRAM
    ENDJRNPF FILE(*LIBL/FILE) JRN(HLIB/JRN)
    ENDCMTCTL

    These code fail to end the journal...
    So i cant endcmtctl...
    MSG prompted: CPF70A6
    any 1 meet this problem before? and any solution?

    cheers

  • #2
    Re: ENDJRNPF with ENDCMTCTL

    You need to end commitment control first before you end journaling.
    But why bother do you want to end journaling after having executed your program and next time you'll have to start journaling again.
    This does not make sense. Why not keeping journaling active?

    Birgitta

    Comment


    • #3
      Re: ENDJRNPF with ENDCMTCTL

      Hi

      I have kept it activity and removed the strjrnpf and endjrnpf.
      But is it necessary to put commit in the f-spec in the rpg?


      Thanks

      Comment


      • #4
        Re: ENDJRNPF with ENDCMTCTL

        Originally posted by peacealida View Post
        But is it necessary to put commit in the f-spec in the rpg?
        No, you do not need to specify commit in the F-Specs.
        Without keyword commit in the F-Specs COMMIT and ROLBK actions are not executed, i.e. your program works as before.

        Birgitta

        Comment


        • #5
          Re: ENDJRNPF with ENDCMTCTL

          to add to what Birgitta said...you may as well not even use any commitment control functionality if you're not going to use COMMIT/ROLLBACK in your RPG programs.
          I'm not anti-social, I just don't like people -Tommy Holden

          Comment


          • #6
            Re: ENDJRNPF with ENDCMTCTL

            This is old but you should download and go thru the example



            jamie
            All my answers were extracted from the "Big Dummy's Guide to the As400"
            and I take no responsibility for any of them.

            www.code400.com

            Comment

            Working...
            X