× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks again. I got the number of records, and used the count in a DOFOR
loop. Reset the file to *START, and then read the second time through using
a regular loop. Worked like a champ!!

On Tue, Aug 26, 2008 at 7:55 AM, David Turnidge <daveturnidge@xxxxxxxxx>wrote:

Thank you all for the excellent ideas... I got swamped with a different
responsibility but now am getting back to the problem. The looping read
sounds interesting...


On Sat, Aug 23, 2008 at 7:12 AM, <vhamberg@xxxxxxxxxxx> wrote:

Hi Dave

I googled for "cpf0864 reopen" and got this link to a midrange-l article -

http://archive.midrange.com/midrange-l/199903/msg00785.html

Now Simon gives 3 solutions. I like a 4th - use RTVMBRD to get the number
of records, then do the read loop that many time - don't go to EOF. Then you
can reposition with POSDBF and do it again.

Now of course, there's always doing the thing in RPG with QCMDEXC to do
the duping.

Actually, to do what you want, maybe use embedded SQL in RPG and have the
first SELECT use a WHERE clause to include only the PFs, run the loop, then
have the second SELECT use a WHERE clause that excludes PFs. Run the loop
again.

HTH
Vern

-------------- Original message --------------
From: "David Turnidge" <daveturnidge@xxxxxxxxx>

Shouldn't be this hard...

I am writing a CLP to read a file resulting from a DSPOBD for a data
library.

I want to read the file through once to create all my physicals.
(CRTDUPOBJ
- Data(*NO).

When I get to EOF, I want to take whatever steps are necessary to start
at
the top of the file to read all the objects that are NOT Physical files,
and
create them.

Right now, when I get to the EOF, I am closing (CLOF) the file, and
reopening it... When I do my next read, it says that the file is still
at
EOF and I drop out of the program.

What am I missing?

TIA,

Dave
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.