Changing variable value in calling RPGLE program

25 pts.
Tags:
iSeries
RPGLE
How do I go about changing a variable value in calling a RPGLE program?


Software/Hardware used:
Iseries RPGLE
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: 7  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.
  • TheRealRaven
    What about it? Is there a question? What OS are you running? What platform? What programming language?
    36,035 pointsBadges:
    report
  • philpl1jb

    Just not enough info.

    is the variable in the call?

    What is it called from?

    54,090 pointsBadges:
    report
  • ToddN2000
    More info is needed. Calling from where another program, debug session? Post the code you have tried.
    134,720 pointsBadges:
    report
  • KeithN

    Detail in the original question has been lost, let me add it back in.

    VendorProgram calls MyProgram without parms.

    While in MyProgram I need to change the values of a variable in VendorProgram. 

    Has anyone manipulated pointer in memory of the job to accomplish this.

    iseries V7R1M0

    In the past vendor supplied code and it was simple enough to add a parm, that is no longer the case.  So can't pass parms, but for things to work I need to be able to get to the variable in the calling program.

     

    25 pointsBadges:
    report
  • KeithN
    All programs are RPGLE
    25 pointsBadges:
    report
  • TheRealRaven
    If there's no source, it's practically impossible. With source, it'd be very difficult at best except that it would be possible at least to place markers in program memory that you might be able to locate. But if you could do that, you could use the parameter list anyway.

    Note that if it was easy, it'd open a significant security problem. Allowing called programs to modify caller memory would be similar to what's allowed with *SERVICE special authority and debug. Values might be temporarily slipped into memory and returned to correct values later, perhaps only while a print line is being generated for a check processing main program. IBM isn't going to make it easy.
    36,035 pointsBadges:
    report
  • ToddN2000
    If the variable is in the vendor program then it is under their control when it's running. How do you plan on stopping it and changing the variable? If this variable is being pulled in from a database you may be able to change it before the vendor program runs. If this is not a viable solution then you may have to write your own program to mimic the vendor program. Not an easy job when there is no code.
    134,720 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: