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?
ASKED: Feb 10, 2012  10:30 AM GMT
UPDATED: March 17, 2012  1:38:40 AM GMT
24,710 pts.

Answer Wiki:
Is thgis a homework question?
A Source PF with a field called AMOUINTS?
Last Wiki Answer Submitted:  Feb 10, 2012  1:54 PM (GMT)  by  CharlieBrowne   24,710 pts.
To see other 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

 36,400 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

 66,765 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.

 36,400 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

 66,765 pts.

 

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

 36,400 pts.