Physical File In AS400:
Physical File is the file which holds the data. This is the
file which holds the space in memory.
It’s Type is PF. It has only one record format.
Maximum number
of fields included in a PF is 8000. While maximum no of key fields are 120.
Steps to Create PF in AS400
- You should have a source file in your library. If you do not has the Source File. You should create one by using command CRTSRCPF.
- Go to that file using WRKMBRPDM ( Work with members using PDM)
- Enter the source file and library name.
- Take F6 option to create, you need to enter Source member name as your PF name and Type as PF for physical file. In text you can enter text with respect to your file.
- You can enter the source of physical file here.
Example of Unique keyword in PF:
I used Unique Keyword in this PF.When I compiled it I got
the Error.
FIFO, LIFO, FCFO, Unique Keywords requires key fields.
So Now I defined Key Field in the file.
Now I am going to put values from SQL.
Use STRSQL on Command Line,
You Can See from Query First record is successfully entered.
While I try to add the same record again with same Key value it states that
Duplicate key value specified.
This is how unique keyword works.
No comments:
Post a Comment