Commitment Control Problem

20 pts.
Tags:
RPG ILE
I have an existing ILE program which now requires a BNDDIR. This program is called from a CL which sets STRCMTCTL LCKLVL(*CHG). I have added the following 'h' spec to the program: bnddir('ICEUTILITY') actgrp(*caller) dftactgrp(*no). But when the program is called it fails with 'Error message CPF4326 appeared during OPEN for file'. I cannot resolve this problem , can anyone help please?

Answer Wiki

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

Thanks for all your advice. I resolved the problem by changing the scope of the commitment control to *JOB.

Discuss This Question: 5  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
  • BigKat
    the additional message text for CPF4326 shows you the likely cause
    Message . . . . :   Commitment definition &6 not valid for open of &4.
    Cause . . . . . :   Commitment definition &6 is not valid for open of member &4 file &2 in library &3 for one of the following reasons:
        -- Member &4 was opened for commitment control when commitment definition &6 was not active.
        -- Uncommitted changes are pending for member &4 for a commitment definition other than &6.
        -- The calling program is using commitment definition &6 which has a scope of *ACTGRP, while the program specified to open the file using a scope of *JOB.
    Recovery  . . . :   Do one of the following and try your request again.
        -- For the first case, use the STRCMTCTL command to start commitment definition &6.
      -- For the second case, either commit the changes (COMMIT command) or rollback the changes (ROLLBACK command).
      -- For the third case, do one of the following: 1) Scope the open of the file to the same activation group as commitment definition &6.  If you are using either OPNDBF or OPNQRYF to open the file, specify either OPNSCOPE(*ACTGRP) OR OPNSCOPE(*ACTGRPDFN).  If you are using a language other than CL to open the file, look at the language manual to find the mechanism for changing the open scope of the file from *JOB to *ACTGRP. Then compile the program again. 2) Change both the CMTSCOPE parameter on the STRCMTCTL command and the ACTPGM parameter on the CRTPGM command so that the scope is the same for all steps of the job. Then compile the program again. 
      -- For any of the cases, change the program to use COMMIT(*NO), and compile the program again.
    
    8,350 pointsBadges:
    report
  • BigKat
    ok, let me try and paste that again the additional message text for CPF4326 shows you the likely cause Message . . . . : Commitment definition &6 not valid for open of &4. Cause . . . . . : Commitment definition &6 is not valid for open of member &4 file &2 in library &3 for one of the following reasons: -- Member &4 was opened for commitment control when commitment definition &6 was not active. -- Uncommitted changes are pending for member &4 for a commitment definition other than &6. -- The calling program is using commitment definition &6 which has a scope of *ACTGRP, while the program specified to open the file using a scope of *JOB. Recovery . . . : Do one of the following and try your request again. -- For the first case, use the STRCMTCTL command to start commitment definition &6. -- For the second case, either commit the changes (COMMIT command) or rollback the changes (ROLLBACK command). -- For the third case, do one of the following: 1) Scope the open of the file to the same activation group as commitment definition &6. If you are using either OPNDBF or OPNQRYF to open the file, specify either OPNSCOPE(*ACTGRP) OR OPNSCOPE(*ACTGRPDFN). If you are using a language other than CL to open the file, look at the language manual to find the mechanism for changing the open scope of the file from *JOB to *ACTGRP. Then compile the program again. 2) Change both the CMTSCOPE parameter on the STRCMTCTL command and the ACTPGM parameter on the CRTPGM command so that the scope is the same for all steps of the job. Then compile the program again. -- For any of the cases, change the program to use COMMIT(*NO), and compile the program again.
    8,350 pointsBadges:
    report
  • philpl1jb
    This would seem to require that you change the socpe of the STRCMDCTL to *JOB Phil
    51,235 pointsBadges:
    report
  • TomLiotta
    What command was used to compile the program (including parms)? Is the calling CL OPM or ILE, and what activation group does it run in? Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    thanks for the feedback.
    51,235 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