+ Reply to Thread
Results 1 to 5 of 5

Thread: Problems with /copy books

  1. #1
    Guest.Visitor Guest

    Default Problems with /copy books

    Hi I am trying to compile a RPGIV program and I get an error with my copy books. It gives me a RNF0257 error and says " Form-type entry for main procedure not vaild or out of sequence" This is my first try at writing a RPGIV program. I used the CVTRPGSRC to convert the copy books to ILE. I am lost I went to the IBM site and found out a command that says to use *yes in the EXPAND COPY MEMBER that should fix the problem but it didn't. I have included a copy of how I did the CVTRPGSRC for the copybooks From file . . . . . . . . . . . > SMHENHSRC Name Library . . . . . . . . . . . > SMHENHLIB Name, *LIBL, *CURLIB From member . . . . . . . . . . > IPBDATA3 Name, generic*, *ALL To file . . . . . . . . . . . . > SMHENHSRC Name, *NONE, QRPGLESRC Library . . . . . . . . . . . > SMHENHLIB Name, *LIBL, *CURLIB To member . . . . . . . . . . . > IPBDATA3LE Name, *FROMMBR Additional Parameters Expand copy member . . . . . . . > *YES *NO, *YES Print conversion report . . . . *YES *YES, *NO Include second level text . . . *NO *NO, *YES Insert specification template . *NO *NO, *YES Log file . . . . . . . . . . . . QRNCVTLG Name, *NONE, QRNCVTLG Library . . . . . . . . . . . *LIBL Name, *LIBL, *CURLIB Log file member . . . . . . . . *FIRST Name, *FIRST, *LAST

    I appreciate any help Frank

  2. #2
    S.Mildenberger Guest

    Default Problems with /copy books

    It sounds like the spec's in your copy book are being brought into the program in the wrong spot. Depending on the spec type in the copy books you may have to move the /copy statement in the source. I don't remember the specifics but do know we ran into this. CVTRPGSRC does move some things around when it does it's conversion. Look at what is in the copy book and move your /copy appropriately. Scott Mildenberger

  3. #3
    Guest.Visitor Guest

    Default Problems with /copy books

    If your /copy has any I specs defined, the /copy needs to be after the D specs. Also, your /copy code needs to be converted to ILE code.

  4. #4
    J.Panzenhagen Guest

    Default Problems with /copy books

    Additionally, you need to have copy books for each type of specification. With RPGIII you could combine F, I, C, and O in the same copy member and then compile the program with autoreport and allow it to sequence them. This will not work with IV. John Panzenhagen

  5. #5
    Guest.Visitor Guest

    Default Problems with /copy books

    Frank, the recommendation to put *YES in the "Expand Copy Member" parameter refers to the main source member. What this does is create a new huge source member including the code from the /copy members (meaning you don't need your /copy member for that source any more). So if you have PGM1 that /COPYs CP1 and CP2, you would do CVTRPGSRC on PGM1 with EXPCPY(*YES). Using EXPCPY(*YES) isn't usually a good final solution to the problem since it means you've lost the benefits of using /copy, but it can be useful to see what the resulting expanded source file looks like, especially to see where it put the statements in /copy files that the compiler is complaining about (or sometimes what's interesting is how it converted them). If your converted /copy member has I specs, but the expand-copy-member source has them as D specs, the converted copy member probably has some commented out D specs in it. Try commenting out the I specs and uncommenting the D specs. If this works, you might have other places where you need the /copy to have I specs. If that's the case, you'll need 2 different /copy members. Barbara Morris, IBM Toronto Lab, RPG Compiler Development

+ Reply to Thread

Similar Threads

  1. Suggestions for SQL in RPG books?
    By aerbag in forum RPG
    Replies: 1
    Last Post: 02-02-2008, 01:00 AM
  2. Where to buy MC books?
    By frankgw@adelphia.net in forum Analysis
    Replies: 1
    Last Post: 10-13-2001, 06:34 AM
  3. EDI Books?
    By Guest.Visitor in forum Programming
    Replies: 0
    Last Post: 04-03-2001, 02:13 PM
  4. JAVA books....
    By Guest.Visitor in forum Programming
    Replies: 17
    Last Post: 03-01-2000, 02:41 PM
  5. COPY BOOKS
    By Guest.Visitor in forum Application Software
    Replies: 1
    Last Post: 07-30-1999, 08:19 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