Declaring the same file twice with two OPENID and reading the same file twice in CL Program

25 pts.
Tags:
AS/400 database
CL programming
Database Files
 Is it posssible read a db file while declaring twice with openID     and reading the same file twice

Software/Hardware used:
AS400

Answer Wiki

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

If you mean read the same file concurrently, I believe you would DCLF two different file names. Like a PF and and LF.
If you mean read through it once and now you want to read through it again, the just declare it one and use POSDBF
Here is a link to other discussion on this issue:

http://forums.systeminetwork.com/isnetforums/showthread.php?t=42943

Discuss This Question: 5  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
    Since it takes four trivial statements to test this (six if you want a fairly exhaustive test), it would be easier to run a live test than to ask the question and wait/watch for an answer. That makes it hard to view this as a "business problem" rather than a "homework/interview problem". Tom
    125,585 pointsBadges:
    report
  • bvining
    You can, depending on the release level of your system, either use two DCLFs with unique OPNIDs; or have one DCLF, use the CLOSE command when you're done reading the file the first time, and then use a RCVF against the closed file. The RCVF will re-open the file for further processing.
    6,620 pointsBadges:
    report
  • CharlieBrowne
    Bruce If you do a CLOF and and then a 2nd RCVF is the cursor at the first record, or do yo uneed to do a POSDBF?
    41,380 pointsBadges:
    report
  • bvining
    After the CLOSE (note that the command to use is CLOSE, not CLOF) the next RCVF will be positioned at the first record within the (implicitly opened) file.
    6,620 pointsBadges:
    report
  • Chraghuveer
    [...] 7. CharlieBrowne, TomLiotta, and Bvining discuss the details of declaring the same file twice with two OpenIDs and reading them simultaneously in a CL program. [...]
    0 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