IBM i Global

 View Only

 Can you transfer a program object to a remote system without compiling on the remote system?

Ryan Speight's profile image
Ryan Speight posted 01/23/26 01:17 PM

As the title suggests, I have a program object that I've developed on our development partition.  I'd like to transfer the program object to our production partition.  I could transfer the source and then compile the program in production, but I'm curious if there is a way to just transfer the program object without the need to compile on the remote system?

Any thoughts?

Rich Malloy's profile image
Rich Malloy IBM Champion

Ryan - ABSOLUTLEY!!! You can save the object to a SAVF, send it to your prod system and then restore it.  A few things to keep in mind though - make sure that you create a SAVF on the prod system before you send it over  - assuming you will use FTP that is. Also, make sure your OS releases between prod and your dev system are 'compatible'. For instance, if your DEV partition is on a higher OS release, you will want to make sure that the compiled object will run on that lower release of the OS - same holds true for when you save it..you will want to save the object based on the OS version you are on in prod otherwise, you won't be able to restore it. After the restore is done, check that the authorities and ownership of that object matches what you need. Same holds true if you have the program object set for Adopted Authority as *OWNER - you will want to verify that attribute is set correctly on your prod system. Hope this helps - Rich

Daniel Gross's profile image
Daniel Gross IBM Champion

If setup correctly, the easiest way would be to use Object Connect.

To send a program object, you can send it to the other machine with the SAVRSTOBJ command.

HTH

Daniel

Marius le Roux's profile image
Marius le Roux IBM Champion

Both Rich and Daniel's answers are valid options. 

Just perhaps consider which version of the operating system you are running on as you might have an isssue there if the version is newer on your Development (or the Source system) to the Target system if they are not the same version of O/S. 

Another option could also be to SSH / SCP the SAVF (Save File) between partitions , (good library is Richard Schoen's : https://github.com/richardschoen/qshoni to help with that securely). 

Satid S's profile image
Satid S

To add to other responses, you can save program objects from a source system with higher IBM i release and restore them to the target system with a lower release by specifying TARGET RELEASE parameter of CRTxxxPGM or SAVOBJ command.  But the range of target release supported is limited (you press F4 at the TGTRLS parameter to see all old releases supported). There are other limitations as well, for example the program must not contain new syntax that the old target releases do not support.   Here is more info:   

To specify that an object be saved for distribution to a system at a different release level than the system on which the save operation is to occur, the procedure differs for program or non-program objects and by the release level on which a program object is created. If, for example, you are saving an object for distribution to a target system running on an earlier release, you have the following choices: 

For program objects:

  • If the program object was created at a release level more current than the targeted earlier release, you must:
    1. create the program object again specifying the targeted earlier release
    2. save the program object specifying the targeted earlier release
    3. restore the program object on the target system.
  • If the program object was created at the same release level as the target system, you can:
    1. save the program object specifying the targeted earlier release
    2. restore the program object on the target system.
Robert Berendt's profile image
Robert Berendt IBM Champion

All good answers.

We have 14 LPARs.  We do not keep compilers, nor any of the development tools, on a vast majority of those partitions.  it is a violation of change control.  Most good change management tools handle this well.  They'll do the distribution to the production partitions.