Call RPGLE Program from RPG Program

5 pts.
Tags:
Parameters
RPG
RPGLE
I have an RPG program. In that program I want to CALL a RPGLE program and pass parameters to it. What I need to know is there some parameter in the compile that I need to do to do this? I get errors when I try to compile the RPG normally.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

You should be able to do a normal call from an RPG to a RPGLE program without any special compile options. What sort of errors do you get when you compile the RPG program?

Regards,

Martin Gilbert.

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Alopez1571
    One of the reason you could not call a RPGLE program from a RPG is that the first one is an ILE program wich receives parameters not supported by RPG III like read only reference (CONST) and by VALUE. If so, you have to create a wrapper ILE program, receiving parameters in the way RPG III can handle (by reference) and forwarding them to original RPGLE program. The parameter by reference is the default mode, they do not have any special keyword, the read only by reference has the CONST keywoerd wich mean it can not be changed in the called program.
    150 pointsBadges:
    report
  • TomLiotta
    One of the reason you could not call a RPGLE program from a RPG is that the first one is an ILE program wich receives parameters not supported by RPG III like read only reference (CONST) and by VALUE. An ILE RPG "program" cannot have parameters passed by VALUE. And a parameter passed as CONST does not need to be passed as a 'constant'; even CL can call a program with a CONST parameter. The CONST attribute is technically more for the compiler than the developer. The prototype in the calling program does not have to specify CONST, so OPM RPG has no problem. Martin's right. We need to know what the error is and what the calling code looks like. It should look like the code for any other CALL. Tom
    125,585 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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following