One of the things I do in my IBM i career is apply vendor-updated "vanilla" source code to client-customized code.
The process is fairly straight forward:
For each client-custom version of a program that received an update from the vendor, compare the two versions, apply vanilla updates to the client version, keeping the customization intact.
Many years ago (think dinosaur age), you would have to create two lists from DSPOBJD (the client-customized objects from a library higher in the library list than the vendor's application library, and the vendor supplied objects within their upgrade library). You would look at the two lists to find matches and identify source locations of each object. Then you would use CMPPFM to generate a report to show the differences between the source members.
I'm very glad we have moved far from those old methods. Today, using the Code for IBM i extension in Visual Studio Code, you can quickly work from filtered source lists, performing comparisons and see differences side by side, and often times just click sections of code to include from one side to the other. If you are a good programmer, it is a little more complex than that because you are analyzing what the code does so that you don't inadvertently break functionality if there is tightly knit custom code around the upgraded code.
For one of my recent projects, I found myself in the twilight zone where my hands were partially tied in the methods I could use to perform the required remediation work. For a bit there, I was beginning to get worried that I had fallen down the deep hole of history back to the CMPPFM days. Fortunately, I didn't just throw my hands up and accept doing things the very old way. But it was an interesting journey to accomplish the task. The tools I had to work with were any of the old 5250 "green screen" PDM tools with SEU; Visual Studio Code WITHOUT the Code for IBM i extension; and ACS Schemas, IFS Browser, and Run SQL Scripts.
The first step was to identify which customized objects were included in the upgrade. Fortunately, the source code resided in the same libraries as the customized objects. In the Test environment, there was a Mod Test library that sat above the Mod Prod library in the library list, so the Mod Test library only contained changed objects being tested, not yet part of production code. Data libraries kept Test and Production completely separate in the environments. The vendor provided upgrade provided source in three libraries. These were a hierarchy based on when the code was modified. Even though it was one upgrade release I was dealing with, it was provided somewhat like a fix, then more fixes and fixes to earlier fixes, while maintaining the upgrade release as one entity. As such, a matched source may or may not exist in any one or more of the three source libraries provided by the vendor. That becomes a bit more complex, and again, I was so glad I didn't have to completely fall back into the dinosaur age.
Now we get to the real meat of this post. Using ACS Run SQL Scripts, I constructed a Select statement to identify which customized members were included in the upgrade and which vendor provided libraries contained the upgraded vanilla source.
The first half (WITH MbrFlags) identifies customized source, whether it is also in the upgrade, and which upgrade libraries the source member is in. The second half presents each customized source having a matched upgrade member, some information about that source member, and within which upgrade release libraries that source member exists.
The result was a huge time saver! Half the battle was won by identifying the scope of which members required remediation.
The next step was to perform the source comparisons. Even though there was no way for me to connect VS Code to this specific IBM i system, I was determined to use its side by side compare function to edit the customized source. Getting the source from file members on the IBM i to text files on the PC was by far the most time consuming. I'm not sure now how I landed on the method I did. There were probably a couple possible methods. I ended up using the IFS Browser to drill down to /QSYS.LIB/source_library.LIB/Q_source_file.FILE/member_name.MBR for each of the source members I needed to deal with, from mod libraries and upgrade libraries, downloading each to an appropriate folder structure on the PC for organization.
Once I had all the relevant source on the PC, using VS Code, I opened the customized source folders to work from their list of source files. Going down the list, I opened one, then opened the appropriate upgrade source version based on the result from the SQL above. Performed the Select for compare and Compare with selected options producing the side by side comparison. Then it was a simple matter of editing the custom version with either copy/paste or clicking the arrow in the center gutter. Save the updated source and repeat for the next customized source in the list.
After all the edits were complete,. I had to get the modified source back to the IBM i. For this step, I used the Send Files tool within the 5250 terminal. I created a new library to receive all the remediated source. I uploaded all the remediated source into this library. This took a while again to perform the transfers.
Once all source members were back on the IBM i, I was able to set my library list appropriately, and compile all the remediated source into new objects for testing.