Diagnostic Reference

Code Message Cause Resolution
TRN2001 Built-in function {bif} is not supported. Supported: {list} The BIF is valid RPG but rpgc does not implement it. Use a supported BIF - the message lists them - or rewrite the logic without it.
TRN2002 Unknown built-in function {bif} The name is not a known RPG built-in function at all. Check for a typo, and check the % prefix.
TRN2003 {%HIVAL/%LOVAL} is not valid for a character enumeration … %HIVAL / %LOVAL was applied to a character DCL-ENUM. A character enumeration's collating sequence is CCSID-dependent, so it has no defined highest or lowest value. Mirrors IBM i RNF0203. Apply them to a numeric enumeration, or compare against an explicit constant.
TRN2003 {%HIVAL/%LOVAL} is not valid for an operand of type {type} … The operand's type has no defined highest/lowest value (for example a pointer or a data structure). Apply them to a packed, zoned, integer, unsigned, float, indicator, character, date, time, or timestamp operand.
TRN2005 Operand '{name}' of FOR-EACH following 'IN' must be an array, %LIST, %SPLIT, or %SUBARR The value after IN is a scalar, a non-array BIF result, a literal, or another non-iterable expression. Mirrors IBM i RNF7205. Iterate a declared DIM array, or %LIST, %SPLIT, or %SUBARR.
TRN2006 Unknown XML-SAX event constant '{name}' (did you mean '{closest}'?) An *XML_... name that is not one of the defined XML-SAX event constants - usually a typo, or one of the event classes Triton RPG does not surface (CDATA-section boundaries - CDATA text arrives as ordinary *XML_CHARS). Rejected rather than accepted as a character value, because an unrecognized name would otherwise compare unequal to every event and silently make the handler branch dead code. Use one of the event constants listed in XML-SAX.
TRN2007 %DEC of a {float / character value / date} … The %DEC form does not match the operand's type. A float or character value has no inherent number of digits, so %DEC(value : precision : scale) is required. A date, time, or timestamp takes only a format - %DEC(value) or %DEC(value : format) - never a precision and scale. A precision without a scale is never valid for a numeric operand: the two-operand form supplies a format. Mirrors IBM i RNF0332, RNF0338, and RNF0328/RNF0339. Use the form that matches the operand - see %DEC and %DECH.
TRN2008 The DSPLY message operand '{name}' has a declared length of {n}, which exceeds the maximum of 52 for DSPLY The DSPLY message (factor 1) may be at most 52 characters on IBM i. The declared length is checked - a VARYING field is judged on its maximum, not its current value. Mirrors IBM i RNF7016 ("Display length {n} greater than maximum allowed of 52; specification is ignored"), a severity-20 error that fails a default CRTBNDRPG and, even where the build proceeds, makes the DSPLY display nothing. Shorten the field to 52 characters or fewer, or display %SUBST(field:1:52).
TRN2009 The DSPLY message operand '{name}' is a pointer, which has no display image A pointer cannot be displayed - there is no rendering of an address that carries meaning, so the operation is rejected rather than given an invented one. Applies equally to a pointer variable, a pointer-returning built-in such as %ADDR or %ALLOC, and a pointer-returning procedure. Mirrors IBM i RNF7011 ("Pointer field {name} not allowed as Factor 1 operand of DSPLY operation"), a severity-30 error that stops the compile. Display something derived from the pointer instead - the data it addresses via a based field, or %ADDR-derived information your program computes as a character or numeric value.
TRN2010 The date literal D'{text}' is not valid *ISO (yyyy-mm-dd) / the time literal T'{text}' is not valid *ISO (hh.mm.ss) Warning. A typed date or time literal is always written in *ISO form - D'yyyy-mm-dd' and T'hh.mm.ss' - no matter what DATFMT or TIMFMT the field it initializes carries. The field's format governs display, never how the literal's own text is read, so date(*usa) inz(d'01/02/0003') is not a *USA literal but an invalid one. Mirrors IBM i RNF0305 (date) and RNF0306 (time), severity-20 warnings that build the program with the field left at its type default. The field is initialized to the default date 0001-01-01 or default time 00.00.00. Rewrite the literal in *ISO: d'01/02/0003'd'0003-01-02', and t'12:34:56't'12.34.56'. An *ISO literal is valid for a field of any format.
TRN2011 Field '{name}' has a declared size of {n}; a size must be at least 1 A field's declared size must be positive. A size may be written as a named constant - dcl-s a char(LEN) - but the constant must be declared before the line that uses it, matching IBM i, which does not resolve a forward reference (RNF3320). A name that is not yet declared resolves to nothing and produces this error. A literal char(0) is caught by the same rule. Move the DCL-C above the declaration that uses it, or correct the literal size. Note that only a bare constant name is valid in a size position.
TRN2012 *N is not valid as a procedure-interface parameter name *N declares an unnamed parameter. It is valid in a prototype (DCL-PR), whose parameter names are documentation only - arguments are matched by position. A procedure interface (DCL-PI) is different: its parameters declare the actual variables the procedure body uses, so an unnamed one could never be referenced. Mirrors IBM i RNF3303 ("The Name entry is blank; specification is ignored"), a severity-30 error. Give the interface parameter a name. The matching prototype may keep *N - the two are matched by position, not by name.
TRN2050 Exported procedure '{name}' collides with a reserved runtime method name … Warning. An exported procedure's name collides with a runtime method (run, dump, commit, …), so it is not exposed to Java callers under its source name. It remains callable as proc_{NAME}. Ignore it if no Java caller needs the procedure; otherwise rename the procedure, or call it by its proc_-prefixed name.