Parms from CL to RPG and back

15 pts.
Tags:
CL to RPG
If I call an RPG program from a CL program and pass a parm then mess about with the parm in the RPG, can I get that parm passed back to the CL when the RPG program has completed?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 4  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.
  • ToddN2000
    We could tell you but that takes the fun out of learning. Have you tried it? Did you get any error or not the results that you expected? Try running it in debug mode and trace the steps and see what happens.

    136,240 pointsBadges:
    report
  • pmunden
    Well that wasn't helpful was it.
    15 pointsBadges:
    report
  • ToddN2000
    What are you doing in your code? There could be other ways to get the same results. hint:  It is recommended to use Prototyped Calls in stead of the “Old” PARM and PLIST opcodes.
    136,240 pointsBadges:
    report
  • TheRealRaven
    CL doesn't "pass parms" exactly. What is made available to a called program whether RPG, COBOL or CL is the address of the CL variable or literal. As such, any change made by the called program will be made to the original value.

    But that's kind of a limited technical answer that is applicable primarily to "CL", the original (OPM) Control Language. CL has been effectively replaced by ILE CL for a couple decades. The original answer only applies if you call a *PGM object with the CALL command rather than calling a procedure with the CALLPRC command. And when using CALLPRC, it applies for *BYREF parms but not *BYVAL parms.
    36,880 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.

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

Following

Share this item with your network: