Changed external data structure

30 pts.
Tags:
PGM
RPG Program
I have RPG program P1 which has an external data structure D1 on a file F1. I am reading the file F1 in PGM A and based on a condition I am calling PGM B. In PGM B I am updating a field of the file F1.When the control returns to PGM A, the updated field in the file F1 shows blank in the external DS D1 in PGM A. Is there any solution to retrieve the updated field in PGM A? I cannot read the file again as there are many logicals.

Answer Wiki

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

You can retrieve that record again, or pass the value back as a parm.

You can pass the complete DS

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.

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
  • TomLiotta
    I cannot read the file again as there are many logicals.   What does "many logicals" have to do with reading the row again?   If the file is updated, and B doesn't pass the value (or the updated record) back to A, the file must be read again to access the value.   Tom
    125,585 pointsBadges:
    report
  • Tecchie
    Thanks for your answer Tom.Based on the incoming parameters to this pgm, logical file is read. There are 20 different scenarios when this pgm can be called and logicals are different. Reading one logical will effect the others.
    30 pointsBadges:
    report
  • TomLiotta
    Reading one logical will effect the others.   Why? It shouldn't.   It could affect values that were retrieved after a previous read, but that would only be true if you read the values into the same variables or if you didn't store the previous values into a second set of variables, e.g., by copying the data structure.   Also, wouldn't this simply be reading the same record as the previous read brought into the program?     Tom
    125,585 pointsBadges:
    report
  • Tecchie
    I have tried reading a single logical and it works...Thanks Tom!!
    30 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