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
Last Wiki Answer Submitted: March 23, 2011 1:09 pm by CharlieBrowne32,785 pts.
All Answer Wiki Contributors: CharlieBrowne32,785 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
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”.
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.
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.
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
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.
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?
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.