Compare Source Code with VS Code for IBM i
Code for i’s source comparison feature recently helped me find a bug. While comparing old vs. new versions of an RPG program, I discovered that a CHAIN had been changed to an SQL SELECT, which was fine, except that an important column name had been forgotten. I created a “before and after” Code for i screen shot for the programmer, who then fixed the mistake.
As documented on the Code for i “Tricks” page, comparing source code takes only two steps. This technique works both for traditional source members and stream files stored in the IFS.
Here are the steps:
- Right-click the name of the first source member or file, then choose “Select for compare.”
- Right-click the name of the second source member or file to compare to, then choose “Compare with Selected.”
Here is an image from the Code for i documentation, showing how the comparison is done.
For additional tips on working efficiently with VS Code for i, see our Code for i Resource Guide and sign up to receive invitations to our Code for i Fridays sessions, held roughly two times per month.
As always, we’re also here to help expedite your IBM i development projects or fill any skills gaps your team may face.


Leave a Reply
Want to join the discussion?Feel free to contribute!