× 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.



Hi,

AFAIK closing and reopening the same file in the same program/procedure is
an enhancement in release 6.1 and will only work for CLLE
programs/procedures and not for CLP.

Before 6.1. it is possible in CLLEs to declare the same file twice (as
already suggested).
But you need to qualify the file and the fields with the openid. In this way
you need to duplicate your source code.

An other way, that I haven't tried yet is to call your CLLE program
rekursively with an appropriate parameter that shows first or second call.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von David Turnidge
Gesendet: Friday, August 22, 2008 21:37
An: Midrange Systems Technical Discussion
Betreff: CLP - Open file, read to end, close file, reopen, still at end...


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

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.