On 30-Jan-2014 09:47 -0800, Hoteltravelfundotcom wrote:
I have a file that is 'txt' not PF. Can I make a logical DDS LF on
Do explain; e.g. how is the PF created and populated [and with what
data], and how must the data be keyed? Is the PF a source-PF created
with CRTSRCPF; that is what normally is called a "text file" on the IBM
i? If so, then yes, a keyed source-LF can be created [with specific
limitations], though the PF could be created keyed too or instead.
There is also the Open Query File (OPNQRYF) which can create an ODP that
can provide ordered data in place of a Logical File.
If not, how can I make an key index on a view?
No. An INDEX only can be created over the physical data. But a
SELECT query that is encapsulated in a VIEW may take advantage of an
existing keyed access path [e.g. may implement with that INDEX used to
enhance its ability to select the desired ata] when the VIEW is opened;
yet the collation remains undefined without an SQL ORDER BY having been
specified on a SELECT query used to perform that open [or again, an ODP
for an OPNQRYF using KEYFLD() could be used instead].