5 pts.
 AS/400 Source. Physical Files. Key Fields?
We assume that we have a source physical file from AS/400 about i.e. Amounts. Is there a way to figure out the key fields?

Software/Hardware used:
ASKED: February 10, 2012  10:29 AM
UPDATED: March 17, 2012  1:38 AM

Answer Wiki:
Thank you for visiting ITKE. We are happy to help you with solving specific IT questions, but need as much information as possible to do so. Let us know about the problem you are trying to solve, how you are approaching it and what work you’ve done so far, and we can help guide you in the right direction.
Last Wiki Answer Submitted:  May 13, 2013  10:51 pm  by  CharlieBrowne   32,835 pts.
All Answer Wiki Contributors:  CharlieBrowne   32,835 pts. , Chris Leonard   2,600 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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

 44,150 pts.

 

…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

 108,055 pts.

 

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.

 44,150 pts.

 

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

 108,055 pts.

 

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

 44,150 pts.