Creating a physical file

You can create a physical file using data description specifications (DDS).

You need to create a library and a source file before you create a physical file.

To create a physical file, follow these steps:

  1. If you are using DDS, enter DDS for the physical file into a source file.
    You can do this using the source entry utility (SEU). SEU is part of the IBM Rational Development Studio for i licensed program.
  2. Create the physical file.
    You can use the Create Physical File (CRTPF) command or the Create Source Physical File (CRTSRCPF) command.
The following command creates a one-member file using DDS and places it in a library called DSTPRODLB.
CRTPF FILE(DSTPRODLB/ORDHDRP)
      TEXT('Order header physical file')

As shown, this command uses defaults. For the SRCFILE and SRCMBR parameters, the system uses DDS in the source file called QDDSSRC and the member named ORDHDRP (the same as the file name). The file ORDHDRP with one member of the same name is placed in the library DSTPRODLB.

Tables are similar to physical files. You can create tables using the CREATE TABLE SQL statement.