Results 1 to 9 of 9

Thread: Callb

  1. #1
    Code400 Newbie
    Join Date
    Sep 2006
    Location
    Florida
    Posts
    11
    Rep Power
    0

    Callb

    Trying to call a program with no parms that produces HTML output.

    Received the following error at compile.

    'Errors were found during the binding step. '

    What am I missing to call a program in ILE.

    Does programs have to be bound before compile and if so how?

    Code:
     C                   callb     'REVTOTAY'

  2. # 666
    Circuit advertisement
    Join Date
    Aug 1965
    Location
    Yakutsk, Russia
    Posts
    1,000,000
     

  3. #2
    Analyst soup_dog's Avatar
    Join Date
    Aug 2006
    Location
    Richmond, VA
    Posts
    562
    Rep Power
    1828

    Re: Callb

    Did you use option 15 or 14 to compile? You should be using option 15.

  4. #3
    Code400 Newbie
    Join Date
    Sep 2006
    Location
    Florida
    Posts
    11
    Rep Power
    0

    Re: Callb

    I used crtbndrpg.

  5. #4
    Analyst soup_dog's Avatar
    Join Date
    Aug 2006
    Location
    Richmond, VA
    Posts
    562
    Rep Power
    1828

    Re: Callb

    Yeah, that won't work. crtbndrpg is option 14. You first need to use option 15 (CRTRPGMOD) and after the module is created use CRTPGM.

  6. #5
    Code400 Newbie
    Join Date
    Sep 2006
    Location
    Florida
    Posts
    11
    Rep Power
    0

    Re: Callb

    I am writing a CHI program that produces HTML. Can I use crtmod instead og crtbndrpg?

  7. #6
    Analyst soup_dog's Avatar
    Join Date
    Aug 2006
    Location
    Richmond, VA
    Posts
    562
    Rep Power
    1828

    Re: Callb

    Not sure what you mean by a CHI program. If the program you are talking about is written in RPG then I would assume you need to use CRTRPGMOD.

    I'm not talking about compiling the REVTOTAY program... even though you do need to compile that.

    I'm talking about the program that contains the CALLB. You need to compile that module using CRTRPGMOD. Then you need to use CRTPGM to "bind" the calling module to REVTOTAY.

  8. #7
    Analyst soup_dog's Avatar
    Join Date
    Aug 2006
    Location
    Richmond, VA
    Posts
    562
    Rep Power
    1828

    Re: Callb

    For example. I have ModuleA which has a CallB to ModuleB in it.

    First I need to compile each module individually using the appropriate compiler. In this case, CRTRPGMOD.

    CRTRPGMOD ModuleA
    CRTRPGMOD ModuleB

    Now you have two modules called ModuleA & ModuleB.

    The next step is to bind those two modules together to create a program.


    CRTPGM PGM(PROGRAM)
    MODULE(MODULEA MODULEB)

  9. #8
    Code400 Newbie
    Join Date
    Sep 2006
    Location
    Florida
    Posts
    11
    Rep Power
    0

    Re: Callb

    Sorry meant CGI not CHI.

    Let me ask you this question.

    Would I be better off using callp and define RPGILE program REVTODAY on D specs.

    [code]
    D REVTODAY PR ExtPgm('REVTODAY')
    C callp REVTODAY

  10. #9
    Analyst soup_dog's Avatar
    Join Date
    Aug 2006
    Location
    Richmond, VA
    Posts
    562
    Rep Power
    1828

    Re: Callb

    To be honest, I have never been a big fan of the callp. I know they are suppose to be very nice and everything but it always seemed like more work than necessary IMO. CallB will give you very nice performance with less work.

    If you already know how to set up the procedure defenitions and stuff though, by all means, use them. You will be fine either way.
    Last edited by soup_dog; September 28th, 2006 at 09:52 AM. Reason: typo

  11. # 666
    Circuit advertisement
    Join Date
    Aug 1965
    Location
    Yakutsk, Russia
    Posts
    1,000,000
     

Facebook Comments


Bookmarks

Posting Permissions

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