×
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.
It's hard to believe there are no logical files - you did not say this, but
I inferred this from your post. Of course, physical files can have keys, as
you say.
I suggest you execute something like
DSPFD FILE(*ALLUSR/*ALL)
TYPE(*BASATR)
OUTPUT(*OUTFILE)
FILEATR(*PF *LF)
(you need also to name an output file)
and check whether you have logicals in your user library.
Then use DSPDBR against the physical files, esp., in those libraries.
Or see whether you have the commands ANZDBF & ANZDBFKY. These do all the
hard work for you, then produce reports with all the keys over the files in
selected libraries. You need Performance Tools to get these. TAATOOLS has
something, as well.
Without DDS (BTW, it's easy to create source for these - see below), you
can use SQL and add constraints, both primary and unique. I don't believe
the keys of a physical file are considered a primary index - I forget.
There is not an ALTER CONSTRAINT - you must DROP the old one and ADD the
new one. Or you can CREATE INDEX in SQL to generate new ones. Again, there
is not an ALTER INDEX, so it's a DROP/ADD process.
There are commands for reverse-engineering DDS for physical files. Here's a
site with links to various of these:
<http://www.as400pro.com/TipsProgTips8.htm#8>
As Elvis said, once you change the keys in PF source, CHGPF will change it.
HTH
Vern
At 08:28 AM 12/22/2003 +0530, you wrote:
I joined my company in 1999 and have been working with DB2/400 and cobol on
AS400.
But, the system has been running here since 1994 when only physical files
were been used.
We do not have much expertise for handling physical data file.
Now we, need to change keys of a physical file.
How can we do it ?
I can say that there is no DDS source of the file in the system.
Plz help.
regards
Santosh.
As an Amazon Associate we earn from qualifying purchases.
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.