Compiling CL Program

250 pts.
Tags:
AS 400
CL Program
CLLE
When compiling a CL program, the program will not compile if the current programmer is not the one who last compiled the program. It gives the following error: CPF2146 40 Owner of object and object being replaced not the same. We then have to delete the object and then compile it. Is there anyway to get around having to do this?

Software/Hardware used:
AS400

Answer Wiki

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

It’s a matter of how they are being compiled and the options taken. If you are trying to compile these using a different user profile. If you are compiling these using option 14 in the PDM environment, prompt it and expand the compile options. Is the User Profile option set to *OWNER or *USER. The easy way around this is we have things set up here under one profile for production. That has the correct *LIBL and all of our developers log on using that to compile new/modified programs. If you are compiling from a command line, it the same thing but you need to remember to change the options every time you compile a program.

Discuss This Question: 7  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.
  • GHENDER
    We compile using option 14 and the user profile is set to *owner.

    We really do not want to have everyone compile using 1 signon because there have been times we needed to know who actually compiled the program.

    I do have a question. Why don't we have this problem when compiling RPGLE programs? Also, what are the ramifications if we compile the CL with the user profile set to *USER? Could we run into a problem if the user does not have the authority to do everything the program is trying to do?

    250 pointsBadges:
    report
  • Splat
    Using 1 signon for multiple people isn't advisable - it causes issues when it comes to tracking & is a bad security practice.

    Use a single group profile for all your developers - being lazy, I use QPGMR - & set OWNER(*GRPPRF).  

    Moving items to production should be limited to one or two people to prevent conflicts.
    12,600 pointsBadges:
    report
  • GregManzo
    Splat has it right. You want each developer to have his/her own profile ('cos the quality of our code seems to improve when we think our peers are watching), but use a group profile so that everyone has authority to compile any object.
    We use GRPPRF(QPGMR) GRPAUT(*ALL), has similar effect except that a small number of programs (mostly DB triggers) need to adopt authority of a specific profile (not QPGMR).
    2,785 pointsBadges:
    report
  • azohawk

    We do what Splat suggests, makes life simpler.  Another option (and recommended especially in multiple developer environment) is to use a change management tool.  One of the advantages is that if the program was previously compiled with non-standard parameters, the tool will pick up the previous parameters and apply them with new compile.

      

    3,645 pointsBadges:
    report
  • GHENDER
    Currently, we all have different profiles and we all have the same authority to compile. The problem is if programmer 1 previously compiled the CL and programmer 2 needs to make changes and recompile the same CL, programmer 2 has to first delete the object before he can compile the CL because it sees programmer 1 as the owner. Is there no way programmer 2 can compile the CL without first having to delete the object?   
    250 pointsBadges:
    report
  • TheRealRaven
    Using a group profile for developer is a good idea. Using any IBM-supplied profile for anything other than IBM work should be avoided, especially if it involves ownership of non-IBM objects (and even more especially for QSECOFR).

    Create two new profiles. Set one to handle all authorities needed for developers and one to act as owner of the application's objects, e.g., this program (unless this program is only used by developers).

    There's more that should be done, but there's often no way that doesn't involve doing it one step at a time.
    27,120 pointsBadges:
    report
  • mmanley
    Another option (while not highly recommended) would be to change the compile command (CHGCMDDFT), to hard code a user profile. This is only practical if you intend to use the same parameters for all your compiles. An alternate solution would be to make your own command (and CL) which calls the IBM command with the parameters you want to supply. In this case, you couldn't use the standard option 14, etc. in PDM, but could launch your own command.
    420 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.

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

Following

Share this item with your network: