This post comes from a question I was asked this week.
In our scenario the company has two IBM i (AS400) servers, the development and testing server we will call DEV400, and the “live” server will be LIVE400.
DEV400 was upgraded from IBM i 6.1 to 7.1 to allow for the purchased ERP application and home-grown programs to be tested that they are compatible with the new release. LIVE400 is currently 6.1, and will be upgrade to 7.1 “sometime this summer”.
The programmers have found that they cannot just compile programs on DEV400 and use the SAVRSTOBJ command to copy them to LIVE400. When they do they get the CPF3743 error informs them that “The file was saved from a more recent release of the operating system”. What to do?
When creating programs or modules it is possible to compile them to be compatible with previous releases, using the TGTRLS parameter of the compile or create statement. On DEV400 it is possible to create these objects for the following releases of IBM i:
- *CURRENT, which is 7.1 and is the default value.
- *PRV, which is 6.1.
- V6R1M0, otherwise known as 6.1 .
- V7R1M0, otherwise known as 7.1 .
Specify Value for Parameter TGTRLS Type choice, press Enter. Type . . . . . . . . . . . . . : SIMPLE NAME Target release . . . . . . . . . > *PRV *CURRENT *PRV V5R4M0 V6R1M0 V7R1M0
When the programmer is compiling a program or module they can simply press the F10, for “Additional parameters”, and find the “Target release” parameter and change it to *PRV. This will create an object that is compatible with 6.1 .
Or the Change Command Default (CHGCMDDFT) command could be used to change the TGTRLS. But this could be changed back to *CURRENT when the next release is applied, or possibly PTFs too. In this scenario I did not recommend this approach.
The most commonly used commands that have the TGTRLS parameter are:
1 Why modify old RPG source? See the post “RPG III let it rest in peace”.
COBOL compiles probably have a TGTRLS too. But who programs in COBOL on an IBM i anymore?
None of the create commands for files (physical, logical, display, printer) have the TGTRLS parameter. Neither does the CRTQMQRY command. These can be just compiled on DEV400 and copied to LIVE400.
There was a software company I worked for who always changed the compile commands to TGTRLS(*PRV), then they could support their customers on the current and previous releases.
You can learn more about the TGTRLS parameter on the IBM website here»
And the Change Command Default (CHGCMDDFT) command on the IBM website here».
- From 1988 – 2000 the IBM i server was known as the AS400.
- From 1988 – 2003 the IBM i operating system was known as OS400.
- April 2, 2008, IBM changed the version identifier format from VxRxMx to the more common format x.x . For example, the current release at the time this post is written is IBM i 7.1, not V7R1M0.
This article was written for IBM i 7.1, and it should be compatible with earlier releases.