× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Converting to RPG4
  • From: "Steven Easton Mail" <seaston@xxxxxxxxx>
  • Date: Tue, 15 Apr 1997 21:48:51 -0500

Converting 1 Program at a time with PDM from rpg 3 to rpg 4, is a little
easier with this program.  Source file must be 112 bytes for it to work. 
It converts to a work member, then copies it back to the original member. 
I have found that STRDBG and STRISDB doesn't always work.  I'm on V3r1.  We
may not convert all programs because of the object programs are 3 times
larger.  We will convert only when the new functions are needed.

Steven Easton
seaston@ionet.net

0001.00 /* Convert RPG 3 source member to RPG 4                   */
0002.00 /*                                                        */
0003.00 PGM      (&lib &file &mbr)
0004.00              dcl  &lib  *char 10
0005.00              dcl  &file *char 10
0006.00              dcl  &mbr  *char 10
0007.00              dcl  &user *char 10
0008.00              dcl  &wrkm *char 10
0009.00              dcl  &continue *char 4
0010.00              dcl  &fnd      *char 1
0011.00              RTVJOBA    USER(&USER)
0012.00              chgvar     &wrkm (&USER *tcat '4')
0013.00              CHGVAR     &FND   'Y'
0014.00              CHKOBJ     OBJ(&LIB/&FILE) OBJTYPE(*FILE) MBR(&WRKM)
0015.00                 MONMSG     MSGID(CPF9810 CPF9815) EXEC(DO)
0016.00                 CHGVAR     &FND  'N'
0017.00              ENDDO
0018.00              IF (&FND *EQ 'Y') DO
0019.00                 SNDUSRMSG  MSG('Member ' *cat &wrkm *cat 'allready
+
0020.00                              exists, C=cancel, G=continue') +
0021.00                              MSGTYPE(*INQ) MSGRPY(&CONTINUE)
0022.00                 IF         COND(&CONTINUE *NE 'G') THEN(RETURN)
0023.00                 RMVM  &LIB/FILE &WRKM
0024.00              ENDDO
0025.00              CVTRPGSRC  FROMFILE(&LIB/&FILE) FROMMBR(&MBR) +
0026.00                           TOFILE(&LIB/&FILE) TOMBR(&wrkm)
0027.00              CHGVAR     &FND   'Y'
0028.00              CHKOBJ     OBJ(&LIB/&FILE) OBJTYPE(*FILE) MBR(&WRKM)
0029.00                 MONMSG     MSGID(CPF9810 CPF9815) EXEC(DO)
0030.00                 CHGVAR     &FND  'N'
0031.00              ENDDO
0032.00              IF (&FND *NE 'Y') DO
0033.00                 SNDUSRMSG  MSG('CONVERSION ERROR, SEE JOB LOG')
0034.00                 RETURN
0035.00              ENDDO
0036.00              CPYSRCF    FROMFILE(&LIB/&FILE) TOFILE(CMAOLD/&FILE)+
0037.00                           FROMMBR(&MBR) TOMBR(&MBR)
0038.00              RMVM       FILE(&LIB/&FILE) MBR(&MBR)
0039.00              RNMM       FILE(&LIB/&FILE) MBR(&wrkm) NEWMBR(&MBR)
0040.00 ENDPGM




* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Midrange System Mailing List!  To submit a new message,   *
* send your mail to "MIDRANGE-L@midrange.com".  To unsubscribe from     *
* this list send email to MAJORDOMO@midrange.com and specify            *
* 'unsubscribe MIDRANGE-L' in the body of your message.  Questions      *
* should be directed to the list owner / operator: david@midrange.com   *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.