I thought of that, but each file has the exact same number of records and
they all use identical record keys.



On 11/14/2014 10:43 AM, Stone, Joel wrote:

Is there a unique key that differentiates the files from each other? For example FILEA has CO#=1, FILEB has CO#=2, FILEC has CO#=3.

Then combine the 3 PFs into one FILEX LF and do a START on FILEX using the CO# as the first key.

-----Original Message-----
From: COBOL400-L [[1]mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of Rich Loeber
Sent: Friday, November 14, 2014 8:55 AM
To: COBOL Programming on the iSeries/AS400
Subject: [COBOL400-L] Dynamic File Selection

I have an interesting problem. From within my CBLLE program, I have a
single file defined, but the actual file being processed may vary
depending on how a user responds to a query. For example, I have FILEA,
FILEB and FILEC all identical but with different content. I want to be
able to switch between them from a single file definition for FILEX. Is
there an equivalent to OVRDBF that I can call in the CBLLE program before
I open the file that will make the switch?

The problem is that I cannot go from CLLE to CBLLE in this case, which is
how this would normally be handled.




Visible links
1. mailto:cobol400-l-bounces@xxxxxxxxxxxx

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2022 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.