
I’m a little confused by your question.
If you’re on the AS/400 you can determine the key fields of any physical file using the command DSPFD. this lists hundreds of attributes of the file including each key field.
Phil

…a source physical file from AS/400…
A “source physical file” is a type of file that will not have key fields. One different kind of file is a “data physical file”, and those can have key fields.
But your question says “from AS/400″, so maybe you used “source” simply to indicate that you have received the file and an AS/400 was the source. Now you want to determine what the key fields are.
Can you explain your question in more detail? What exactly do you have? What kind of system is it on?
Tom

and if your question was something like this:
Can the keys of a physical data file be determined from the source used to create it?
Yes, in DDS source the keys will be listed after the field list. They will be of record type ‘K’.
But, there may be copies of the source that aren’t in sync with the actual files. That’s why I suggested the DSPFD command which extracts the key infromation from the data file instead of the source of the data file.

Can the keys of a physical data file be determined from the source used to create it?
Most of the time, yes. The ‘out of sync’ case is one exception.
A second exception is when a primary key is assigned with ADDPFCST. Physical files were often created in most earlier OS releases without keys. Keys can be added later with the more recent command.
Tom

or Would this be a question about constraints?
Keys as in key constraints…


















