+ Reply to Thread
Results 1 to 9 of 9

Thread: Converting RPGII to RPGIV

  1. #1
    Guest.Visitor Guest

    Default Converting RPGII to RPGIV

    Would anyone have any suggestions on the best way to convert RPGII programs to RPGIV? Thanks

  2. #2

    Default Converting RPGII to RPGIV

    Carefully. You might want to take the intermediate step of converting to RPG III first. The reason behind this, is that while many batch programs may convert fairly smoothly, many others will not. Particularly if an internally described file is being created by the program. Interactive programs are another ball of wax. Much has to be done removing modified data tags, and the INVITE keyword. Multi-line displays should be replaced by subfiles, etc. Then there is the use of different function keys for different purposes. An S/36 standard was to use F7 to end a program. On the AS/400 it is usually F3 or F12. Then there are design considerations: Much coding done in RPG II is not necessary in RPG III or RPG IV. This is very evident when it comes to long batch streams, where files are created, sorted, manipulated, and deleted. The database features that can be used on the AS/400 eliminates the need for much of this. The ability to call programs and the use of ILE features may mean that you will want to break off portions of your existing RPG II code, so that it may be reused as a "called" program or procedure. Report programs should have the name of the printer file changed to QSYSPRT. Interesting errors occur if you do not do this. Any internal blocking performed in RPG II is not allowed in the same fashion, in RPG III or IV. If you use ADDROUT files, you should replace these with record sorts. Best of luck in your efforts, Dave

  3. #3
    Guest.Visitor Guest

    Default Converting RPGII to RPGIV

    I was wondering about this myself, as a question came up in the office today. Do you use CVTRPGSRC command to convert to either RPG III or just to RPG IV from RPG II? I have converted from RPG III to IV quite a few times, but never from RPG II.

  4. #4

    Default Converting RPGII to RPGIV

    There are many incompatibilities between RPG II, and RPG III. I feel that it is very necessary to convert a program to RPG III prior to using the CVTRPGSRC command. You may have already figured out that I have never used the CVTRPGSRC command on RPG II source. Another reason I feel that this would not work, is that the source type is RPG36 as opposed to RPG. AFAIK, CVTRPGSRC only works with RPG type members. Dave

  5. #5
    Guest.Visitor Guest

    Default Converting RPGII to RPGIV

    David is correct(partially ), the valid member types are 'blank', RPG, RPG38, RPT, RPT38 and SQLRPG. Also, when I switched from the S/36 to the AS/400 (ages ago) I converted some RPGII programs to RPGIII. This is a non-trival task. I found very few conversion processes which could be automated. I spent about 6 months converting one sub-system (A/R). We decided, after that, to purchase a new software package which was already written in RPGIII. Jerry Hensley Peerless Chain

  6. #6
    Guest.Visitor Guest

    Default Converting RPGII to RPGIV

    The help screen for CVTRPGSRC says...
     The Convert RPG Source (CVTRPGSRC) command converts RPG III or RPG/400 source code to ILE RPG source code.
    Looks like all the work I did re-writing RPGII to RPGIV was not in vain. I HAVE used CVTRPGSRC to convert RPGIII to RPGIV and love it! ==Scott==

  7. #7
    Guest.Visitor Guest

    Default Converting RPGII to RPGIV

    THERE ARE SOME OTHER, HOME-GROWN CONVERTERS THAT WORK WELL; I THINK BRAD STONE HAS ONE. BOBH

  8. #8

    Default Converting RPGII to RPGIV

    Scott Cargill wrote: Looks like all the work I did re-writing RPGII to RPGIV was not in vain. A lot depends on your shop, resource allocation and budget. I am the only person who touches any code at all in this shop, and I do it only two days a week. There are over 800 active programs, and 40% of my efforts are in new development, part of which includes the web site. Converting working programs (most of which have not been touched in years) has a extraordinarily low priority. I do it, only at those times when there is nothing else to do. Due to these circumstances, I find it easier to convert RPG II code, to RPG III prior to using the CVTRPGSRC command. There is also a lot of S/36 COBOL code to convert as well. I know that this is subjective, but this particular shop can not justify a "conversion project". There are literally thousands of other similar shops in the same boat. This is in contrast to another client I have. They were RPG/400 only. I converted the entire kit and kaboodle (especially the kaboodle) en masse during the Y2K effort. This went very smoothly. Dave

  9. #9
    Guest.Visitor Guest

    Default Converting RPGII to RPGIV

    That sounds about the way I have been converting code. I still have a lot of code out there in the 36 world. I don't touch it (if it ain't broke, don't fix it) unless that are some modifications or fixes to put into the code, then I will convert it over to RPGIV. You have a good idea there though... The next time I will try the trick of converting it to RPGIII, then run the CVTRPGSRC command to get it into RPGIV. That sounds like it would be easier than having to basically analyze the code and completely re-write it in RPGIV. ==Scott==

+ Reply to Thread

Similar Threads

  1. System 36: RPGII
    By Guest.Visitor in forum RPG
    Replies: 4
    Last Post: 10-24-2002, 06:33 AM
  2. Convert RPGII (EXTK) to RPGIV
    By Guest.Visitor in forum Programming
    Replies: 9
    Last Post: 02-08-2001, 06:01 AM
  3. Looking For A Book - RPGII
    By Guest.Visitor in forum Hardware
    Replies: 3
    Last Post: 03-24-1998, 07:03 AM
  4. PC RPG Compiler beyond RPGII
    By Guest.Visitor in forum Hardware
    Replies: 0
    Last Post: 01-01-1995, 02:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts