The source physical file contains the sources of different source members. This file has a specific structure. CRTSRCPF is the command used to create the source physical file. We can create up to 32767 members in a single source file. The source file is an object, but the source members contained within it are not objects.
The command used to create the source file is CRTSRCPF FILE(TESTLIB/QDDSSRC) RCDLEN(92)
RCDLEN parameter in the CRTSRCPF command indicates the record length of the source physical file. Record length refers to thenumber of bytes in the source physical file’s length of records.The record format of the source physical file consists of three fields.
Source sequence number
Date
Source statement
The default record length is 92 bytes. The source sequence number has 6 bytes, Date 6 has bytes, and the source statement has 80 bytes. The important thing about this is that the source sequence number (6 bytes) and the date (6 bytes) have fixed forms, which means that a total of 12 bytes are fixed—the remaining go toward the source statement. For the record’s length, which can reach 32766 bytes. Thus, the permissible values for record length span from 13 to 32766 bytes. The following are the sizes of some of the common source physical files.
QRPGSRC, QDDSSRC, QDDLSRC, QCLSRC, QCMDSRC, etc – record length of 92
QRGLESRC – a record length of 112 (92 default + 20 bytes of comment)
The AS400 command line tool WRKMBRPDM is used to view every source member of a source physical file. To add a new source member of any kind to the source physical file, use F6 on WRKMBRPDM.
Physical file:
The physical file contains data.
the command used to create a physical file is CRTPF.
create a physical file PF1 in library TESTLIB using source member PF1 present in source physical file QDDSSRC in TESTLIB CRTPF FILE(TESTLIB/PF1) SRCFILE(TESTLIB/QDDSSRC) SRCMBR(PF1)
Or create a physical file without a source member and of record length 92. CRTPF FILE(TESTLIB/PF1) RCDLEN(92)
A database file containing data records is referred to as a physical file. After that, the records are organized into physical file members, each of which has a unique access path to the data. The physical files should ideally have a single member by default, inserted immediately upon creation.
A physical file can have only one record format.
The physical file has four levels of entries, which are listed below in a certain order:
File Level
Record Format Level
Field Level
Key Field Level
File-level entries are optional.The keywords used at the file level are listed below:
UNIQUE
FIFO
LIFO
FCFO
REF
The record format name is specified along with an optional text description at the record format level. The keywords used at this level are listed below:
FORMAT
TEXT
Field name, length, and data type, along with option Text description and Column heading, are specified for each field at the field level. The keywords used at this level are listed below:
ALIAS
ALWNULL
CCSID
CHECK
CHKMSGID
CMP/COMP
COLHDG
DATFMT
DATSEP
DFT
EDTCDE
EDTWRD
REFFLD
REFSHIFT
TEXT
TIMFMT
TIMSEP
VALUES
VARLEN
Key field names are listed at key field level entries.Keywords used at this level are listed below:
Source Physical file:
The source physical file contains the sources of different source members. This file has a specific structure. CRTSRCPF is the command used to create the source physical file. We can create up to 32767 members in a single source file. The source file is an object, but the source members contained within it are not objects.
The command used to create the source file is
CRTSRCPF FILE(TESTLIB/QDDSSRC) RCDLEN(92)
RCDLEN parameter in the CRTSRCPF command indicates the record length of the source physical file. Record length refers to the number of bytes in the source physical file’s length of records. The record format of the source physical file consists of three fields.
The default record length is 92 bytes. The source sequence number has 6 bytes, Date 6 has bytes, and the source statement has 80 bytes. The important thing about this is that the source sequence number (6 bytes) and the date (6 bytes) have fixed forms, which means that a total of 12 bytes are fixed—the remaining go toward the source statement. For the record’s length, which can reach 32766 bytes. Thus, the permissible values for record length span from 13 to 32766 bytes. The following are the sizes of some of the common source physical files.
The AS400 command line tool WRKMBRPDM is used to view every source member of a source physical file. To add a new source member of any kind to the source physical file, use F6 on WRKMBRPDM.
Physical file:
The physical file contains data.
the command used to create a physical file is CRTPF.
create a physical file PF1 in library TESTLIB using source member PF1 present in source physical file QDDSSRC in TESTLIB
CRTPF FILE(TESTLIB/PF1) SRCFILE(TESTLIB/QDDSSRC) SRCMBR(PF1)
Or create a physical file without a source member and of record length 92.
CRTPF FILE(TESTLIB/PF1) RCDLEN(92)
A database file containing data records is referred to as a physical file. After that, the records are organized into physical file members, each of which has a unique access path to the data. The physical files should ideally have a single member by default, inserted immediately upon creation.
A physical file can have only one record format.
The physical file has four levels of entries, which are listed below in a certain order:
File-level entries are optional. The keywords used at the file level are listed below:
The record format name is specified along with an optional text description at the record format level. The keywords used at this level are listed below:
Field name, length, and data type, along with option Text description and Column heading, are specified for each field at the field level. The keywords used at this level are listed below:
Key field names are listed at key field level entries. Keywords used at this level are listed below: