COZZI - Create Source Files (CRTSRCLIB)
The COZZI - Create Source Files (CRTSRCLIB) command creates source files in a library that are typically used for application development. Use this command when creating a new library or to add all the necessary source files to an existing library. The command optionally creates the library.
Keyword |
Description |
Choices |
Notes |
LIB |
Library |
Name |
Required, Positional 1 |
SRCLEN |
Source length (recommend 112+) |
92-32766, 112, *ILE, *OPM, *MAX, *MAXSEU, *SEUMAX |
Optional, Positional 2 |
FREELEN |
Free format source length |
92-32766, *ILE, *OPM, *SRCMAX, *SEUMAX, *SRCLEN, *MAXSEU |
Optional, Positional 3 |
OPMSRC |
Create OPM RPGIII source |
Name, *NONE, *RPG |
Optional, Positional 4 |
CRTLIB |
Create library if necessary |
*YES, *NO |
Optional, Positional 5 |
TYPE |
Library type |
*TEST, *PROD |
Optional, Positional 6 |
TEXT |
Text 'description' |
Character value, 'Developer Source Library' |
Optional, Positional 7 |
Library (LIB)
Specifies the library name into which the source files are created. If the library does NOT exist, and CRTLIB(*YES) is specified, the library is created and the source files are created within it. If the library already exists, the source files are created within the existing library.
This is a required parameter.
- name
- Specify the name of the library into which the source files shall be created. If the library does not exist and CRTLIB(*YES) is specified, the command will create the library before creating the source files.
Source Rcd Length (SRCLEN)
Specifies the length of the source files being created, it includes:
- SRCSEQ
- Zoned(6,0) Source Sequence Number
- SRCDAT
- Zoned(6,0) Source Statement Change Date
- SRCDTA
- Char(srclen-12) Source Statement
- 112
- The source record length if 100 plus 6-digits of sequence number, and 6-digits of source statement change date. This is the Recommended source length for ILE-based languages.
- *ILE
- The source length is 112 - same as specifying SRCLEN(112).
- 92
- The source record length is 80 plus the 12 positions for sequence and change date values. This is the recommended length for OPM languages such as RPGIII, RPGII, CLP, and CMD source files.
- *OPM
- The source length if 92 - same as specifying SRCLEN(92).
- *MAXSEU
- The source record length is 240. 12 positions are for sequence numbering and statement change date, leaving 228 for source code. This is the maximum length supported by Edit Source on the IBM i system (NOTE: Edit Source is the source editor often referred to as "SEU" or "PDM".)
- 92-240
- Type in the length of the source file record, including the 12 positions used by the source statement change dates and sequence numbers.
Free format source record len (FREELEN)
Specifies the source record length for non-fixed format languages or text files. This includes the following source files:
- QSQLSRC
- SQL Source
- QCSRC
- ILE C and C++ Source
- H
- ILE C and C++ Header File
- QXMLSRC
- XML Source
- QPNLSRC
- UIM Panel Source
- QHTMLSRC
- HTML Source
- *MAXSEU
- The maximum allowed length for SEU is used. As of this writing, that maximum is 240 including the source sequence number and change date. Leaving 228 positions for the source statement.
- *SRCLEN
- The free format source files are created using the length specified on the SRCLEN parameter.
- 92-240
- Type in the length of the source file record, including the 12 positions used by the source statement change date and sequence number.
Create OPM Source (OPMSRC)
Specifies whether to create legacy OPM source for RPGII and RPG III source members. A source file with whatever name is specified here is created with a record length of 92. When OPMSRC(*NONE) is specified, no OPM source files are created. Use this parameter to include QRPGSRC source file in the creation.
- *RPG
- The source file QRPGSRC is created with a record length of 92.
- *NONE
- No OPM source files are created.
- source-file-name
- The name of a source file that will be created using the OPM source record length of 92.
Create library if necessary (CRTLIB)
Specifies whether to create the library name specified on the LIB parameter if it does not already exist.
- *YES
- If the library name specified on the LIB parameter does not exist, it is created and then the source files are created in the library. If the library already exists, the source files are created in the existing library.
- *NO
- If the library specified on the LIB parameter does not exist, and error is issued and the request is cancelled. No source files are created. If the library exists, the source files are created in the existing library.
Library type (TYPE)
When CRTLIB(*YES) is specified and the library does not exist, it is created using the CRTLIB command and the value specified for this parameter is passed to the CRTLIB TYPE parameter. If CRTLIB(*NO) is specified or the library specified on the LIB parameter already exists, this parameter is ignored.
- *TEST
- The library is created as a test library. Specifing UPDPROD(*NO) on STRDBG has no impact on files stored in this library.
- *PROD
- The library is created as a production library. Specifying UPDPROD(*NO) on STRDBG will cause the process to fail if files in this library are open for update processing.
Text 'description' (TEXT)
Specifies the text description associated with the library being created. If CRTLIB(*NO) is specified or the library specified on the LIB parameter already exists, this parameter is ignored.
- character-value
- Specify the text description to be assigned to the library being created. If the library already exists, this parameter is ignored.
Error messages for CRTSRCLIB
*ESCAPE Messages
- CPF9801
- Object &2 in library &3 not found.
- CPF9802
- Not authorized to object &2 in &3.
- CPF9803
- Cannot allocate object &2 in library &3.
- CPF9807
- One or more libraries in library list deleted.
- CPF9808
- Cannot allocate one or more libraries on library list.
- CPF9810
- Library &1 not found.
- CPF9811
- Program &1 in library &2 not found.
- CPF9812
- File &1 in library &2 not found.
- CPF9820
- Not authorized to use library &1.
- CPF9830
- Cannot assign library &1.
- CPF9899
- Error occurred during processing of command.