Record Types

This section describes the information contained in all the different record types. Typically a compiler writes records and an application reads them.

Names, field types and other information passed through the different record types are not validated and no authority is checked by QLYWRTBI. The QLYWRTBI API assumes that all that validation and checking has been done.

There are the following record types:

The following table shows the records that can be written by each compiler.

All fields where information is not available to put in these records should be filled with blanks.

The following is true for the Library specified fields for all records and compilers:

Notes and restrictions are explained in the footnotes following the tables.

Record Types and Processors (Part 1)

Record Type Record ID RPG/400(R): CRTRPGPGM COBOL/400(R): CRTCBLPGM CLD: CRTCLD DDS: CRTPF CRTLF CRTDSPF CRTICFF CRTPRTF CL: CRTCLPGM CMD: CRTCMD
Processor member start '01' X(1, 3) X X(1, 3) X X(1, 3, 5) X(1)
Processor object start '50'            
Normal processor end '20' X X X X X(5) X
Normal processor end call next '21'            
Normal multiple end record '65'            
Abnormal processor end '30' X X X X X(5) X
Include '02' X(11) X        
File reference '03' X X   X X(1, 5)  
Module reference '55'            
Service program reference '60'            
Bind directory reference '75'            
Record format reference '04' X X   X X(1, 5)  
Field reference '05'       X(2)    
Message reference '06'       X(2, 9)   X(1, 2, 6, 9)
External reference error '15' X(10) X   X(10) X(1, 4, 5)  
Object already exists error '16'       X    
Start of new program '40'   X(20)        


Record Types and Processors (Part 2)

Record Type Record ID DB2(R) UDB for iSeries(TM): CRTSQLRPG CRTSQLCBL ILE RPG/400: CRTRPGMOD CRTBNDRPG ILE COBOL/400: CRTCBLMOD CRTBNDCBL ILE C: CRTCMOD CRTBNDC ILE CL: CRTCLMOD CRTBNDCL ILE DB2 UDB for iSeries: CRTSQLRPGI CRTSQLCBLI CRTSQLCI
Processor member start '01' X(1) X(1, 3) X X(3) X(1, 3) X(1)
Processor object start '50'            
Normal processor end '20' X X X X X X
Normal processor end call next '21' X X(14) X(14) X(14) X(14) X
Normal multiple end record '65'            
Abnormal processor end '30' X X X X X X
Include '02' X(1, 7) X(11) X X(8, 12)   X(1, 7)
File reference '03' X(1) X X X X(1) X(1)
Module reference '55'            
Service program reference '60'            
Bind directory reference '75'           X
Record format reference '04' X(1) X X X X(1) X(1)
Field reference '05'            
Message reference '06'            
External reference error '15' X(1) X(10) X X(10, 13) X(1, 4) X(1)
Object already exists error '16'            
Start of new program '40'     X(20)     X(20)


Record Types and Processors (Part 3)

Record Type Record ID ILE SRVPGM: CRTSRVPGM ILE CRTPGM UIM: CRTPNLGRP CRTMNU UDT: SYSTYPE (*NONE) UDT: member
Processor member start '01' X(18)   X X(17)   X
Processor object start '50'   X(16)     X(19)  
Normal processor end '20' X X X X   X
Normal processor end call next '21'           X
Normal multiple end record '65'         X(19)  
Abnormal processor end '30' X X X X X(19) X
Include '02'     X X   X
File reference '03'           X
Module reference '55' X X        
Service program reference '60' X X        
Bind directory reference '75' X X        
Record format reference '04'           X
Field reference '05'           X
Message reference '06'     X X   X
External reference error '15' X(15) X(15) X X   X
Object already exists error '16'           X
Start of new program '40'           X

Notes and Restrictions for the Above Tables:

  1. If *CURLIB is specified for the Library specified fields (this includes the Source library specified field on the Processor member start record), the resolved library name is passed instead of *CURLIB.

  2. If *LIBL is specified for the Library specified fields, or implied by not being specified, the resolved library name is passed instead of *LIBL.

  3. If *CURLIB is specified for the Target library field, the resolved library name is passed instead of *CURLIB.

  4. For most Used fields, when a file being referenced on the DCLF command cannot be found, CL puts blanks in this field. There is no actual file or library name when the file is not found.

  5. For all fields marked Reserved, CL initializes them to hex zeros. However, fields that are not reserved are set to blanks when they do not apply and are defined as characters. For example, Target member on the Processor member start record does not have meaning for the CL compiler and is initialized to blanks.

  6. Message reference records are written only for messages specified on the PROMPT parameter of the PARM, ELEM, or QUAL command definition statement.

  7. The SQL compilers do not write include records for the following statements:
    EXEC SQL INCLUDE SQLCA
    EXEC SQL INCLUDE SQLDA

    These statements are not true includes in the sense that the SQL compiler does not read source from another member or source file.

  8. The ILE C compiler does not write API Include records for system include files. File names enclosed in angle brackets, (< ... >), designate system include files. File names enclosed in double quotation marks, (" ... "), designate user include files.

  9. The Message file used and Library used fields are always blank.

  10. If *LIBL is specified in the source, or implied by not being specified (Library specified is *LIBL), the Library used field is set to *LIBL because no specific library can be determined if the file is not found in the library list.

  11. The RPG/400 compiler puts *LIBL in the Library specified field if it is not already specified, and QRPGSRC in the File specified field if it is not already specified.

    The ILE RPG/400 compiler puts *LIBL in the Library specified field if it is not already specified, and QRPGLESRC in the File specified field if it is not already specified.

  12. The Library specified field is the resolved library name if the library name is not already specified. The Include file specified field contains the resolved file name if the file name is not already specified.

  13. If *CURLIB is specified in the source (Library specified is *CURLIB), the Library used field is set to *CURLIB because no specific library can be determined if the file is not found in the library list.

  14. This record is written only by the CRTBNDxxx commands.

  15. This record is written only when a SRVPGM or MODULE does not exist, and this causes the compilation to fail.

  16. The object fields in this record refer to the ENTMOD parameter for the CRTPGM command.

  17. CRTMNU only writes records when TYPE(*UIM) is specified.

  18. The source used fields contain the same information as the source specified fields.

  19. User-defined types are part types that the user created.

  20. Any COBOL/400 source may contain more than one program.

Processor member start record

This, or the Processor object start record, must be the first record that is passed by the compiler or preprocessor on its first call to the QLYWRTBI API. Its purpose is to identify the source that is being compiled, and also to describe the expected output object, if any.

Note: This record was previously called the processor start record, but the format remains the same.

The Processor member start record has the following format:

Offset Type Field
Dec Hex
0 0 BINARY(4) Record length
4 4 CHAR(2) Record type
6 6 CHAR(2) Reserved
8 8 CHAR(10) Processor command
18 12 CHAR(10) Source object name specified
28 1C CHAR(10) Source library name specified
38 26 CHAR(7) Source object type
45 2D CHAR(10) Source member name specified
55 37 CHAR(10) Source object name used
65 41 CHAR(10) Source library name used
75 4B CHAR(10) Source member name used
85 55 CHAR(10) Target object name specified
95 5F CHAR(10) Target library name specified
105 69 CHAR(7) Target object type
112 70 CHAR(10) Target member name specified
122 7A CHAR(2) Reserved


Processors for which this record type applies

All compilers and preprocessors listed in Record Types and Processors (Part 1) except CRTPGM, and the processor processing the user-defined types added with SYSTYPE(*NONE) on the ADDADMTYPE command.


Field Descriptions

Processor command. The compiler or preprocessor that wrote this record, for example, CRTRPGPGM.

Record length. The length of this record is 124.

Record type. The type of this record is '01'.

Reserved. An ignored field.

Source library name used. The actual name of the library that was used. The library name could be different from the specified library name because *LIBL or *CURLIB was specified, or an override was used. This field contains the name the library resolves to.

Source library name specified. The library name of the source file specified on the compiler or preprocessor command.

Source member name used. The actual name of the source member that was used. This field is required, even if the two member names are the same.

Source member name specified. The source member name specified on the compiler or preprocessor command.

Source object name used. The actual name of the object that was used. The object name could be different from the specified object name if an override was used.

Source object name specified. The object name specified on the compiler or preprocessor command.

Source object type. The i5/OS(TM) type of the source object (for example, *FILE).

Target library name specified. The library of the target object specified on the compiler or preprocessor command.

Target member name specified. The name of the member to be created, if applicable, specified on the compiler or preprocessor command.

Target object name specified. The name of the object to be created, called the target object, specified on the compiler or preprocessor command. The actual name of the object that was created is passed through the Normal processor end record. (See Normal processor end record.)

Target object type. The i5/OS type of the object to be created (for example, *FILE).


Processor object start record

This, or the Processor member start record, must be the first record that is passed by the compiler or preprocessor on its first call to the QLYWRTBI API. Its purpose is to identify the object that is being processed, and also to describe the expected output object, or, for user-defined types, the expected location of the output members, if any.

User-defined types added with SYSTYPE(*NONE) on the ADDADMTYPE command must write this record before any other record.

The Processor object start record has the following format:

Offset Type Field
Dec Hex
0 0 BINARY(4) Record length
4 4 CHAR(2) Record type
6 6 CHAR(2) Reserved
8 8 CHAR(10) Processor command
18 12 CHAR(10) Object name specified
28 1C CHAR(10) Object library name specified
38 26 CHAR(7) Object type specified
45 2D CHAR(10) Object name used
55 37 CHAR(10) Object library name used
65 41 CHAR(7) Object type used
72 48 CHAR(10) Target object name specified
82 52 CHAR(10) Target object library name specified
92 5C CHAR(7) Target object type specified
99 63 CHAR(1) Reserved


Processors for which this record type applies

CRTPGM and the processor processing the user-defined types added with SYSTYPE(*NONE) on the ADDADMTYPE command.


Field Descriptions

Object library name specified. The library name of the object specified on the compiler or preprocessor command. If the object type specified is a user-defined type with SYSTYPE(*NONE), the library name specified should be the group library name.

Object library name used. The actual name of the library that the object was found in. The library name could be different from the specified library name because, for example, *LIBL or *CURLIB was specified. This field contains the name the library resolves to.

Object name specified. The object name specified on the command. If the object type specified is a user-defined type with SYSTYPE(*NONE), the object name specified should be the part name.

Object name used. The actual name of the object that was used. The object name could be different from the specified object name if an override was used.

Object type specified. The object type specified on the command. For user-defined types this must be left blank. If the object type specified is a user-defined type with SYSTYPE(*NONE), the object type specified should be the part type.

Object type used. The actual type of the object used. For example, *MODULE. For user-defined types this can be left blank.

Processor command. The compiler or preprocessor that wrote this record, for example, CRTPGM.

Record length. The length of this record is 100.

Record type. The type of this record is '50'.

Reserved. An ignored field.

Target object library name specified. The library of the target object specified on the command. For user-defined types, the library where the output members are created, as specified on the command.

Target object name specified. The name of the object to be created, or modified as specified on the command. For user-defined types this can be left blank.

Target object type specified. The type of the object to be created. For example, *PGM. The actual name of the object that was created is passed through the Normal processor end record. (See Normal processor end record.) For user-defined types, the names of the output members are passed through the Normal multiple end record. For user-defined types this value must be *MBR.


Normal processor end record

This is the last record passed by the compiler or preprocessor to indicate that processing ended successfully.

The Normal processor end record has the following format:

Offset Type Field
Dec Hex
0 0 BINARY(4) Record length
4 4 CHAR(2) Record type
6 6 CHAR(2) Reserved
8 8 CHAR(10) Object name created
18 12 CHAR(10) Library
28 1C CHAR(7) Object type
35 23 CHAR(10) Member
45 2D CHAR(7) Message identifier


Processors for which this record type applies

All compilers and preprocessors listed in Record Types and Processors (Part 1), except the processor processing the user-defined types added with SYSTYPE(*NONE) on the ADDADMTYPE command.


Field Descriptions

Library name. The library where the object was created.

Member name. The name of the member created, if applicable.

Message identifier. The message identification of the completion message.

Object name created. The object created by the compiler or preprocessor. If an object is not created, this field stores the value of '*NONE'.

Object type. The type of object created.

Record length. The length of this record is 52.

Record type. The type of this record is '20'.

Reserved. An ignored field.


Normal processor end call next record

When a preprocessor successfully creates an object or a member and needs to call another compiler or preprocessor, it should pass this record instead of passing the Normal processor end record as the final record. For example, if the CRTSQLCI command is entered with OPTION(*GEN), and the member is created successfully, the last record written by CRTSQLCI is the Normal processor end call next record. The preprocessor then calls the CRTBNDC command that eventually writes the Normal or Abnormal processor end record.

The Normal processor end call next record has the following format:

Offset Type Field
Dec Hex
0 0 BINARY(4) Record length
4 4 CHAR(2) Record type
6 6 CHAR(2) Reserved
8 8 CHAR(10) Object name
18 12 CHAR(10) Library name
28 1C CHAR(7) Object type
35 23 CHAR(10) Member name
45 2D CHAR(7) Message identifier


Processors for which this record type applies

CRTSQLRPG CRTSQLCBL CRTSQLRPGI CRTSQLCBLI
CRTBNDRPG CRTBNDCBL CRTBNDC CRTBNDCL
CRTSQLCI when OPTION(*GEN) is specified processor processing the user-defined types represented as members


Field Descriptions

Library name. The library where the object was created.

Member name. The name of the member created, if applicable.

Message identifier. The message identification of the completion message.

Object name. The name of the object created.

Object type. The type of object created.

Record length. The length of this record is 52.

Record type. The type of this record is '21'.

Reserved. An ignored field.


Normal multiple end record

This is the last record passed by a user-defined type added with SYSTYPE(*NONE) on the ADDADMTYPE command. It identifies Normal multiple end processing of all the output members. One Normal multiple end record is written per member generated. The Normal processor end record should not be written.

Note: It is possible that the processor generated 10 members on the last build, and because of a change, now needs to regenerate just 2 of those members. For the build process to preserve the relationships to the remaining 8 members, the processor must write all members to the API, regardless of whether the member was actually regenerated. The build process ignores those parts (members) that have either not changed (because the processor did not regenerate them), or do not exist (because the processor did not generate them, and they may exist higher in the hierarchy).

The Normal multiple end record has the following format:

Offset Type Field
Dec Hex
0 0 BINARY(4) Record length
4 4 CHAR(2) Record type
6 6 CHAR(2) Reserved
8 8 CHAR(10) Library
18 12 CHAR(10) File name created
28 1C CHAR(10) Member
38 26 CHAR(32) Part type
70 46 CHAR(32) Part language
102 66 CHAR(22) Reserved


Processors for which this record type applies

The processor processing the user-defined types added with SYSTYPE(*NONE) on the ADDADMTYPE command.


Field Descriptions

File name created. The file name that was created or used to hold the member.

Library. The library where the member was created.

Member. The name of the member created.

Part language. The language of the part to represent this member.

Part type. The type of the part to represent this member.

Record length. The length of this record is 124.

Record type. The type of this record is '65'.

Reserved. An ignored field.


Abnormal processor end record

This is the last record passed if the compiler or preprocessor fails because of an error. For example, an object or a member was not created because of compile errors, or REPLACE(*NO) was specified on the command and the object existed.

If the command failed because an external reference to a file, message file, module, bind directory or service program could not be found, the command passes the External reference error record before passing this one. See External reference error record for more information on this record.

The Abnormal processor end record has the following format:

Offset Type Field
Dec Hex
0 0 BINARY(4) Record length
4 4 CHAR(2) Record type
6 6 CHAR(2) Reserved
8 8 CHAR(7) Message identifier
15 F CHAR(1) Reserved


Processors for which this record type applies

All compilers and preprocessors listed in Record Types and Processors (Part 1).


Field Descriptions

Message identifier. The message identification of the completion message.

Record length. The length of this record is 16.

Record type. The type of this record is '30'.

Reserved. An ignored field.


Include record

This record is passed when the compiler or preprocessor processes an include. An include statement is a statement that causes the compiler to replace the include statement with the contents of the specified header or file. If the include is not found, the compiler or preprocessor passes the Abnormal processor end record.

The Include record has the following format:

Offset Type Field
Dec Hex
0 0 BINARY(4) Record length
4 4 CHAR(2) Record type
6 6 CHAR(2) Reserved
8 8 BINARY(4) Nesting level
12 C CHAR(10) Include file name specified
22 16 CHAR(10) Include file library name specified
32 20 CHAR(10) Include file member name specified
42 2A CHAR(7) Object type
49 31 CHAR(10) Include file name used
59 3B CHAR(10) Include file library name used
69 45 CHAR(10) Include file member name used
79 4F CHAR(1) Reserved


Processors for which this record type applies

CRTRPGPGM CRTCBLPGM CRTRPGMOD CRTBNDRPG
CRTCBLMOD CRTBNDCBL CRTCMOD CRTBNDC
CRTSQLRPGI CRTSQLCBLI CRTSQLCI CRTPNLGRP
CRTMNU processor processing the user-defined types represented as members


Field Descriptions

Include file used. The actual name of the include file that was used. For example, the default include file used by the compiler and implied in the source, or the file different from the one specified in the source as a result of an override. This name must always be filled in.

Include file specified. The name of the file that contains the include. This is the name specified in the source (if the include was file qualified), otherwise it is blank.

Include file library used. The name of the actual library that contains the include file that was used (for example, a specific library name instead of *CURLIB or *LIBL, as specified in the source, or a library different from the one specified in the source, as a result of an override).

Include file library specified. The name of the library where the include file resides, as specified in the source (if the include was library qualified), otherwise it is blank.

Include file member used. The actual name of the source member containing the include that was used. This name must always be filled in.

Include file member specified. The name of the source member containing the include, as specified in the source.

Nesting level. The level of nesting of the include. Includes found in the root source have a nesting level of 1, includes found in level 1 have a nesting level of 2 and so on.

Object type. The object type of the object containing the include, for example *FILE.

Record length. The length of this record is 80.

Record type. The type of this record is '02'.

Reserved. An ignored field.

The nesting level should be indicated even by those compilers that do not allow include nesting. In that case, the nesting level passed should be equal to 1.


File reference record

This record is passed when the compiler or preprocessor encounters a reference to an externally described file but not its record format or field.

For example, a reference is made in DDS source using the PFILE or JFILE keywords. Another example is when a compiler or preprocessor copies all the record format declares from a file. This is not considered to be a dependency on any specific record format and is treated as a dependency on the file, so this record must be passed, not the Record format reference records for all the individual record formats.

The File reference record has the following format:

Offset Type Field
Dec Hex
0 0 BINARY(4) Record length
4 4 CHAR(2) Record type
6 6 CHAR(2) Reserved
8 8 CHAR(10) File name specified
18 12 CHAR(10) File library name specified
28 1C CHAR(1) Based on indicator
29 1D CHAR(10) File name used
39 27 CHAR(10) File library name used
49 31 CHAR(3) Reserved
52 34 BINARY(4) Nesting level


Processors for which this record type applies

CRTRPGPGM CRTCBLPGM CRTPF CRTLF
CRTDSPF CRTICFF CRTPRTF CRTCLPGM
CRTSQLRPG CRTSQLCBL CRTRPGMOD CRTBNDRPG
CRTCBLMOD CRTBNDCBL CRTCMOD CRTBNDC
CRTCLMOD CRTBNDCL CRTSQLRPGI CRTSQLCBLI
CRTSQLCI processor processing the user-defined types represented as members


Field Descriptions

Based on indicator. Indicates whether the referenced file is used to base another file on. Possible values are N (no) and Y (yes).

File name used. The name of the actual file that was referenced. This name must always be filled in.

File name specified. The name of the file referenced, as specified in the source.

File library name used. The name of the actual library that contains the file that was referenced. The library name could be different from the specified library name because *LIBL or *CURLIB was specified, or an override was used.

File library name specified. The name of the library of the file referenced, as specified in the source.

Nesting level. If this file reference is made within an include, this field has value of N + 1, where N is the nesting level of the include. Otherwise, the value of this field is 1.

Record length. The length of this record is 56.

Record type. The type of this record is '03'.

Reserved. An ignored field.



Module reference record

This record is passed when a module is successfully referenced by a processor. This record is not to be written for the ENTMOD module, on the CRTPGM command.

The Module reference record has the following format:

Offset Type Field
Dec Hex
0 0 BINARY(4) Record length
4 4 CHAR(2) Record type
6 6 CHAR(2) Reserved
8 8 CHAR(10) Module name specified
18 12 CHAR(10) Module library name specified
28 1C CHAR(10) Module name used
38 26 CHAR(10) Module library name used


Processors for which this record type applies

CRTSRVPGM and CRTPGM.


Field Descriptions

Module name used. The name of the actual module that was referenced. This name must always be filled in.

Module name specified. The name of the module referenced, as specified on the command, or in the bind directory.

Module library name used. The name of the actual library that contains the module that was referenced. The library name could be different from the specified library name because *LIBL or *CURLIB was specified.

Module library name specified. The name of the library of the module referenced, as specified on the command, or in the bind directory.

Record length. The length of this record is 92.

Record type. The type of this record is '55'.

Reserved. An ignored field.


Service program reference record

This record is passed when a service program is successfully referenced by a processor.

The Service program reference record has the following format:

Offset Type Field
Dec Hex
0 0 BINARY(4) Record length
4 4 CHAR(2) Record type
6 6 CHAR(2) Reserved
8 8 CHAR(10) Service program name specified
18 12 CHAR(10) Service program library name specified
28 1C CHAR(10) Service program name used
38 26 CHAR(10) Service program library name used
48 30 CHAR(16) Service program signature used


Processors for which this record type applies

CRTSRVPGM and CRTPGM.


Field Descriptions

Record length. The length of this record is 64.

Record type. The type of this record is '60'.

Service program name used. The name of the actual service program that was referenced. This name must always be filled in.

Service program name specified. The name of the service program as specified on the command.

Service program library name used. The name of the actual library that contains the service program that was referenced. The library name could be different from the specified library name because *LIBL or *CURLIB was specified.

Service program library name specified. The name of the library of the service program referenced, as specified on the command.

Service program signature used. The current signature of the service program used.


Bind directory reference record

This record is passed when a module is successfully referenced by a processor. This record is not to be written for the ENTMOD module, on the CRTPGM command.

The Bind directory reference record has the following format:

Offset Type Field
Dec Hex
0 0 BINARY(4) Record length
4 4 CHAR(2) Record type
6 6 CHAR(2) Reserved
8 8 CHAR(10) Bind directory name specified
18 12 CHAR(10) Bind directory library name specified
28 1C CHAR(10) Bind directory name used
38 26 CHAR(10) Bind directory library name used


Processors for which this record type applies

CRTSRVPGM and CRTPGM.


Field Descriptions

Bind directory name used. The name of the actual bind directory that was referenced. This name must always be filled in.

Bind directory name specified. The name of the bind directory referenced, as specified on the command.

Bind directory library name used. The name of the actual library that contains the bind directory that was referenced. The library name could be different from the specified library name because *LIBL or *CURLIB was specified.

Bind directory library name specified. The name of the library of the bind directory referenced, as specified on the command.

Record length. The length of this record is 48.

Record type. The type of this record is '75'.

Reserved. An ignored field.


Record format reference record

This record is passed when the compiler or preprocessor encounters a reference to a record format of an externally described file (but not to any single field). For example, a reference is made in DDS source using the FORMAT keyword or in the RPG, COBOL, CL, DB2 UDB for iSeries SQL, ILE RPG, ILE COBOL, ILE CL, or ILE C processors whenever a declaration of a record format structure from a DDS-described file is generated by the compiler or preprocessor.

The Record format reference record has the following format:

Offset Type Field
Dec Hex
0 0 BINARY(4) Record length
4 4 CHAR(2) Record type
6 6 CHAR(2) Reserved
8 8 CHAR(10) File name specified
18 12 CHAR(10) File library name specified
28 1C CHAR(10) Record format name
38 26 CHAR(13) Record format level ID
51 33 CHAR(10) File name used
61 3D CHAR(10) File library name used
71 47 CHAR(1) Reserved
72 48 BINARY(4) Nesting level


Processors for which this record type is applicable

CRTRPGPGM CRTCBLPGM CRTPF CRTLF
CRTDSPF CRTICFF CRTPRTF CRTCLPGM
CRTSQLRPG CRTSQLCBL CRTRPGMOD CRTBNDRPG
CRTCBLMOD CRTBNDCBL CRTCMOD CRTBNDC
CRTCLMOD CRTBNDCL CRTSQLRPGI CRTSQLCBLI
CRTSQLCI processor processing the user-defined types represented as members


Field Descriptions

File name used. The name of the actual file that was referenced. This name must always be filled in.

File name specified. The name of the file being referenced, as specified in the source.

File library name used. The name of the actual library that contains the file that was referenced. The library name could be different from the specified library name because *LIBL or *CURLIB was specified, or an override was used. This field contains the name the library resolves to.

File library name specified. The name of the library of the file being referenced, as specified in the source.

Nesting level. If this record format reference is made within an include, this field has value of N + 1, where N is the nesting level of the include. Otherwise, the value of this field is 1.

Record format level ID. The level ID of the record format referenced.

Record format name. The name of the record format referenced.

Record length. The length of this record is 76.

Record type. The type of this record is '04'.

Reserved. An ignored field.


Field reference record

This record is passed when the compiler or preprocessor encounters a reference to a field in an externally described file. For example, a reference is made in DDS source using the REF and REFFLD keywords.

The Field reference record has the following format:

Offset Type Field
Dec Hex
0 0 BINARY(4) Record length
4 4 CHAR(2) Record type
6 6 CHAR(2) Reserved
8 8 CHAR(10) File name specified
18 12 CHAR(10) File library name specified
28 1C CHAR(10) Record format name
38 26 CHAR(13) Record format level ID
51 33 CHAR(10) Field
61 3D CHAR(3) Reserved
64 40 BINARY(4) Field length
68 44 BINARY(4) Decimal positions
72 48 CHAR(1) Data type
73 49 CHAR(1) Fixed/variable length indicator
74 4A CHAR(10) File name used
84 54 CHAR(10) File library name used
94 5E CHAR(2) Reserved


Processors for which this record type applies

CRTPF CRTLF CRTDSPF CRTICFF
CRTPRTF processor processing the user-defined types represented as members


Field Descriptions

Data type. The field data type in DDS. For example, P, S, B, F, A, or H.

Decimal positions. The number of decimal positions if the field is numeric, otherwise 0.

Field. The name of the referenced field.

Field length. The length of the field in bytes. If the field is a variable-length field, the maximum length should be passed.

File name used. The name of the actual file that was referenced. This name must always be filled in.

File name specified. The name of the file being referenced, as specified in the source.

Fixed/variable length indicator. Contains F if the field is of fixed length, or V if variable length.

File library name used. The name of the actual library that contains the file that was referenced.

File library name specified. The name of the library of the file being referenced, as specified in the source.

Record format level ID. The level ID of the record format referenced.

Record format name. The name of the record format referenced.

Record length. The length of this record is 96.

Record type. The type of this record is '05'.

Reserved. An ignored field.


Message reference record

This record is passed when the compiler encounters a reference to a message ID in a message file. For example, a reference is made in DDS source using the MSGCON keyword.

The Message reference record has the following format:

Offset Type Field
Dec Hex
0 0 BINARY(4) Record length
4 4 CHAR(2) Record type
6 6 CHAR(2) Reserved
8 8 CHAR(7) Message identifier
15 F CHAR(10) Message file name specified
25 19 CHAR(10) Message file library name specified
35 23 CHAR(10) Message file name used
45 2D CHAR(10) Message file library name used
55 37 CHAR(1) Reserved
56 38 BINARY(4) Nesting Level


Processors for which this record type applies

CRTPF CRTLF CRTDSPF CRTPRTF
CRTICFF CRTCMD CRTPNLGRP CRTMNU
processor processing the user-defined types represented as members  


Field Descriptions

Message file library used. The name of the actual library that contains the message file. This may be *CURLIB or *LIBL if the compiler does not resolve to the library name.

Message file library specified. The name of the library that contains the message file, as specified in the source.

Message file name used. The name of the actual message file that was referenced. This name must always be filled in.

Message file name specified. The name of the message file referenced, as specified in the source.

Message identifier. The message ID referenced.

Nesting Level. The level of nesting of the MSGF. MSGFs referenced in the root source have a nesting level of 1, MSGFs found in level 1 have a nesting level of 2 and so on.

Record length. The length of this record is 60.

Record type. The type of this record is '06'.

Reserved. An ignored field.


External reference error record

This record is passed when processing fails because a referenced object, such as a file, message file, module, bind directory or service program cannot be found. This record does not apply to includes.

After passing one or more of these records, the compiler or preprocessor also passes the Abnormal processor end record (see Abnormal processor end record).

The External reference error record has the following format:

Offset Type Field
Dec Hex
0 0 BINARY(4) Record length
4 4 CHAR(2) Record type
6 6 CHAR(2) Reserved
8 8 CHAR(10) Object name specified
18 12 CHAR(10) Object library name specified
28 1C CHAR(7) Object type
35 23 CHAR(10) Object name used
45 2D CHAR(10) Object library name used
55 37 CHAR(1) Based on indicator


Processors for which this record type applies

CRTRPGPGM CRTCBLPGM CRTPF CRTLF
CRTDSPF CRTICFF CRTPRTF CRTCLPGM
CRTSQLRPG CRTSQLCBL CRTRPGMOD CRTBNDRPG
CRTCBLMOD CRTBNDCBL CRTCMOD CRTBNDC
CRTCLMOD CRTBNDCL CRTSQLRPGI CRTSQLCBLI
CRTSQLCI CRTSRVPGM CRTPGM CRTPNLGRP
CRTMNU processor processing the user-defined types represented as members


Field Descriptions

Based on indicator. Whether the referenced file is used to base another file on. Possible values are N (no) and Y (yes). This field is used by the CRTLF processor.

Object library name used. The actual name of the library that contains the object that was referenced.

Object library name specified. The name of the library that contains the object that was not found.

Object name used. The actual name of the object that was referenced. This name must always be filled in.

Object name specified. The name of the object referenced that was not found.

Object type. The type of object that was not found.

Record length. The length of this record is 56.

Record type. The type of this record is '15'.

Reserved. An ignored field.


Object already exists error record

This record is passed when the compiler or preprocessor fails because the object that was to be created exists. There is no REPLACE parameter on the command because the compiler or preprocessor expects the object not to exist.

After passing this record, the compiler or preprocessor must also pass the Abnormal processor end record (see Abnormal processor end record).

The Object already exists error record has the following format:

Offset Type Field
Dec Hex
0 0 BINARY(4) Record length
4 4 CHAR(2) Record type
6 6 CHAR(2) Reserved
8 8 CHAR(10) Object name that already exists
18 12 CHAR(10) Object library name
28 1C CHAR(7) Object type
35 23 CHAR(1) Reserved


Processors for which this record type applies

CRTPF CRTLF CRTDSPF CRTICFF
CRTPRTF processor processing the user-defined types represented as members


Field Descriptions

Object library name. The name of the library that contains the object that already exists. A specific library name, not *CURLIB or *LIBL must be passed.

Object name that already exists. The name of the object that already exists and could not be replaced.

Object type. The type of the object that already exists.

Record length. The length of this record is 36.

Record type. The type of this record is '16'.

Reserved. An ignored field.


Start of new program record

The COBOL/400 compiler is able to compile source that contains more than one program. This record is passed by the COBOL/400 compiler when the beginning of a new program is encountered.

The Start of new program record has the following format:

Offset Type Field
Dec Hex
0 0 BINARY(4) Record length
4 4 CHAR(2) Record type
6 6 CHAR(2) Reserved
8 8 CHAR(10) New program name
18 12 CHAR(10) Object name created
28 1C CHAR(10) Object library name
38 26 CHAR(7) Message identifier
45 2D CHAR(3) Reserved
48 30 CHAR(7) Object type
55 37 CHAR(1) Reserved


Processors for which this record type applies

CRTCBLPGM CRTCBLMOD CRTBNDCBL CRTSQLCBLI
processor processing the user-defined types represented as members  


Field Descriptions

Message identifier. The message ID of the completion message.

New program name. The name of the new program, per IDENTIFICATION DIVISION.

Object library name. The library where the object was created. This field contains blank if an error occurred.

Object name created. The name of the object created in the previous step. If an object was not created because of syntax errors or because REPLACE(*NO) was specified and the object already existed, this field contains '*ERROR'.

Object type. The type of object created. For example, *PGM or *MODULE.

Record length. The length of this record is 56.

Record type. The type of this record is '40'.

Reserved. An ignored field.


Top | High-level Language APIs | APIs by category