OVRDBF SHARE(*YES)

210 pts.
Tags:
AS/400
COBOL
OVRDBF
When OVRDBF SHARE(*YES) is used on "FILEA" and you have "FILEA" defined in "ProgramA" and "ProgramB". I know that doing a READ, START etc... in either program moves the Pointer for both programs since they share the buffer. But are the FIELD values for "FILEA" the same in both programs? EXAMPLE: "PROGRAMA" READS "FILEA" and "FIELDA" has value of "X".  "PROGRAMA" calls "PROGRAMB" and "PROGRAMB" does a READ NEXT of "FILEA" and "FIELDA" is now setting at "Y" in "PROGRAMB". Is "FIELDA" value for both Programs setting at "Y" or is "PROGRAMA" still "X"?

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.

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

Discuss This Question: 3  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
  • BeanBaggs
    I think I have answered my own question as in both "PROGRAMA" and "PROGRAMB" the "FIELDA" of "FILEA" would be setting at "Y" now because of the READ NEXT in "PROGRAMB".
    210 pointsBadges:
    report
  • TomLiotta
    ...because of the READ NEXT... COBOL provides a kind of access to the file buffers. If you aren't using the READ {NEXT} INTO format, you could be seeing buffer values. READ ... INTO copies into WORKING STORAGE. A READ without the INTO clause should simply increment the pointer to the buffer to access the next record. (There may be no data movement at all.) I haven't actually tried what you're asking, but it might make sense for COBOL. A shared ODP will share the file pointer. That is, OVRDBF SHARE(*YES) allows multiple programs to use the same file pointer. If access is through the FD record entry rather than through a WORKING STORAGE copy, I wouldn't be surprised if field values seemed to change. What actually changed would be the address that the field pointed to. Tom
    125,585 pointsBadges:
    report
  • BeanBaggs
    Yes talking about the FD level both programs have the program defined. So it did switch in the "PROGRAMA" which makes sense. Thanks for input.
    210 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