The workaround leads me back to my first problem. If I do not hit end offile, the file remains locked and I cannot overlay it with the next spool
WRKSPLF to *print
Copy splf to FILE1
Copy splf to FILE2
QCLSCAN for string
If string found
Subject: Re: CLOF & POSDBF issue
Date: Thu, 10 Sep 2009 16:07:39 -0500
There is a workaround for this problem. You can do a RTVMBRD and get
the number of records in the file. Knowing that, you can read the file
in a DOFOR group and avoid hitting the end of file. It can then be
repositioned and read a second time.
DeLong, Eric wrote:
I think you may need to create a second CL program to do the file2--
processing. I think that hitting eof in a rcvf loop in CL cannot be
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Ron Hudson
Sent: Tuesday, September 08, 2009 2:18 PM
Subject: CLOF & POSDBF issue
I have a CL program which does a WRKSPLF to an outfile, then copies the
outfile to a PF.
The CL loops thru each record of the first PF, and copies the splf to a
second PF and reads thru this second splf looking for a string. At EOF
on the second PF, or when the string is found, I want to process the
next record in the first PF.
When I find the string:
if I exit the loop, then attempt to copy the next splf to the second
PF, I get an error message the file is locked, even though I've done a
CLOF on the second PF.
if I continue reading to EOF, I can copy the next splf to the second
PF, but I'm stilled positioned at the EOF. POSDBF is not positioning to
the beginnign of the file.
Is there any way around this situation.
I've searched the archives, found where this has been posted before but
not a solution. I do see reference to Scott having an explanation to
this but I cannot find his explanation.
With Windows Live, you can organize, edit, and share your photos.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
http://www.bing.com/cashback?form=MSHYCB&publ=WLHMTAG&crea=TEXT_MSHYCB_BackTTo post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
Get back to school stuff for them and cashback for you.