Can VS Code be used for older RPG? #3005
-
|
We have a mixture of RPG Code... SQLRPGLE, RPGLE, and RPG400. RPG400 Source Code...
Thank you! Any response is greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
Hi @johnstagliano , Moving to Git is the right way to go but it also requires some preparation and a change of mindset (which is the hardest part, usually 😅). But before doing that, you could at least convert those RPG400 members to RPGLE (CVTRPGSRC for the win). That won't cost you anything and then you'll be able to move forward with the modernization of your code, at your own pace. At least you'll be able to use free format here and there when maintaining those programs. Converting to ILE is required before moving to Git though, as CRTRPGPGM can't take an IFS path. Once you've done that, and if you wish to move to Git, then TOBi is a good tool to take care of the build. /include|copy will work too. Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
|
Hi @johnstagliano and @sebjulliand It is true that CRTRPGPGM can't take an IFS path, i.e. compile from source in the IFS. The same limitation goes for CRTCLPGM, CRTDSPF, CRTPF etc. However, you can overcome this limitation using the CRTFRMSTMF command developed by Brian Garland. CRTFRMSTMF is a wrapper for any CRT-command, and it simply copies the streamfile to a temporary QSYS.LIB sourcefile member before calling the CRT-command. So if you install CRTFRMSTMF on your server, you can have all your source in IFS and git without having to convert the RPG source to RPGLE. I've used CRTFRMSTMF for many years with great success. Only caveat is that you loose the link between the object created and the source, since the object will show the temporary source member as the source. For programs, the most important objects, this is not a problem, since you should include the compiler listing in the program object anyway (for true debugging) using HTH! 😃 |
Beta Was this translation helpful? Give feedback.

I figured out my problem. I named the source sbg011.pgm.rpg. When I removed the .pgm from the middle of the name and adjusted my rules file, it compiled. But, it's still frustrating that there was really nothing that told me I had to name it without the .pgm. I've tried to name rpgle without the .pgm in the middle and the rpgle won't compile as a program without the .pgm.
If anyone knows how to get better logging when there is an error with the build, I would greatly appreciate knowing. I do get source errors from the compile, but, I never got any useful message from the makei build before I did the rename of my source.
Thank you!