|Source physical file in AS400|
Source physical file is an object in AS400 which of course no doubt resides in a library. So, what does it actually contain?
It basically contains the different types of source members which contain the source code either in RPG, CL, COBOL, DDS, SQL, etc. Those source members are not an object until and unless they are not compiled.
CL command CRTSRCPF is used for creating a source physical file inside the library.
provide source physical file name in this parameter, some standard source file names are QRPGSRC(RPG source), QRPGLESRC(RPG ILE source), QDDSSRC (DDS source), QDDLSRC (SQL source), QCLSRC (CL source), QCMDSRC (Command source), etc, and the library where you want to create it.
provide the record length of the source physical file i.e. the number of bytes in the length of records stored in the source physical file. The record format of the source physical file contains three fields.
- Source sequence number
- Source statement
Standard Record Lengths of SRCPF
QRPGSRC, QDDSSRC, QDDLSRC, QCLSRC, QCMDSRC, etc - record length of 92
QRGLESRC - a record length of 112 (92 default + 20 bytes of comment)