Create a physical file

This topic shows how to 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. This can be done using the source entry utility (SEU). SEU is part of IBM® WebSphere® Development Studio for iSeries™.
  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.

Similar to physical files are tables. Tables can be created using iSeries Navigator or using the CREATE TABLE SQL statement.

Related concepts
Create a library
Create a source file
Work with source files
Describe database files
Get started with iSeries Navigator
Related reference
Create Physical File (CRTPF) command
Create Source Physical File (CRTSRCPF) command
CREATE TABLE