Compile Program for previous system level

305 pts.
AS/400 and SQL
SQL procedure
Hi, My system is on IBM i V7R1. I have a SQL procedure on AS/400 created using "CREATE PROCEDURE" command on SQL400 command prompt. By default resultant Program object is created with CLE attribute & for System Level V7R1M0. I want to compile this program for System Level V6R1M1. How to do this as source of the program is also not available? Regards, Ketan

Software/Hardware used:

Answer Wiki

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

You can backup this object with target release up to 2 back levevel release…and restore it to the Target Sys.



For a SQL stored proc, no, you cannot save the object to any previous level. The save operation will result in a CPF3741 “not saved” message with a CPD6427 message pointing out the version incompatibility. Only an EXTERNAL stored proc external object can be saved to a back-level release, and then only if it was compiled to allow it.



Discuss This Question: 4  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
    I'm not aware of any way to back-level stored procedures. Nor can I think of a good reason for it since the stored procedure source can be retrieved and used on any reasonably current AS/400. . Tom
    125,585 pointsBadges:
  • philpl1jb
    So confused. Perhaps it's the CLLE program that creates stored procedures. No source.
    54,090 pointsBadges:
  • TomLiotta
    When a stored proc is created, there is always source available. It might be just the CREATE PROCEDURE statement itself, most easily retrievable with iSeries Navigator. . For an EXTERNAL stored proc, that's also stored with the program that executes the stored proc function. It's what makes it possible to save and restore the *PGM and have it be automatically registered by DB2 as a stored proc if migrated to a different system. But for those, the TGTRLS() can be specified when the *PGM is compiled. . For SQL stored procs, I don't know that anything can be done to influence the target release. I.e., unless the whole system is saved and restored. Otherwise, AFAIK, the CREATE PROCEDURE itself needs to be run on the 6.1 system. . Tom
    125,585 pointsBadges:
  • Ketan19
    Hassan, Objects with *PGM type cannot be saved with back level target release. . Hi Tom, Completely agreed with what you have said. I have encountered this problem in MIMIX replication where source system is IBM i 7.1 & Target is IBM i 6.1 & thus replication of this PGM was failing. After searching haven't found anything. The best (and I have done also) is to create procedure on IBM i 6.1 & transfer the PGM object to Source system which is IBM i 7.1. No problem in replication now. Thanks for the help. . -Ketan
    305 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: