Splitting and merging large RPG source files

10 pts.
Tags:
RPG
RPG Program
What are the commands to split an RPG program so more lines can be added? Also, how to merge the 2 sources together again? My current source has 32,000 lines.
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TheRealRaven
    Best thing to do is rewrite it to cut maybe 31,500 or more lines out. Break areas into functional procedures, compile them into *MODULEs and bind them into a complete *PGM object.

    One potential beginning step is simply to copy sections of code into separate source members. The sections should each contain source lines that are logically connected, for example complete subroutines.

    Replace the copied sections with /COPY statements in the original source member.

    You might even create subroutines to cut into new source members if needed.

    Of course, there's no real reason to do anything since you can have much more than 32000 source lines in a source member. For a test, I just edited a RPGLE source member that had 190464 source lines, including inserting a new line to bring it to 190465 lines. No problem.
    31,855 pointsBadges:
    report
  • ToddN2000
    I agree with Raven. Program that get that large are hard to maintain. We have a lot of very large programs, We have either broke out sections into external calls or copybooks to keep code size down. This is a good way to maintain pieces of code that are normally duplicated in many programs. You just change one copybook, call or stored procedure then recompile all that use it and you are good to go.
    124,430 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: