ascot diagnostics

Every diagnostic ascot reports, from the checker’s own definitions (ascot diagnostics). A code’s page gives its severity and message, when it fires, what IRIS does with such code, what to change, and an example, in which a line ending in //! A1234 is where that diagnostic lands. A code can be dropped or re-ranked with -d, as in -d off:A1234; see the README’s Diagnostics Filter. The style rules are in STYLE.md, and style.json is the recommended style file: commands long and lowercase, functions and system variables long and uppercase.

Errors

Code Message
A1073 Label ‘{label}’ is outside this procedure block, which GOTO cannot leave
A1727 Syntax error {scope}: {detail}
A1935 Too many arguments: ‘{name}’ takes {takes}; the statement fails when it runs
A2357 ‘{name}’ is not a parameter of {class}{hint}
A2521 A CALL argument cannot name a column: ‘{column}’ has no table to come from
A2716 Too many arguments to the macro ‘{name}’, which takes {expected}
A2733 $CASE needs a case:value arm or a :default after its target
A2746 Property ‘{name}’ is not MultiDimensional, so it stands for no variable here
A2797 The macro ‘{name}’ is undefined{suggestions}
A2957 No {used} ‘{name}’: no method or class query of the schema’s package is SqlProc under that name
A3119 Member ‘{name}’ is defined twice
A3139 Cannot find member ‘{mem}’ in {cls}{suggestions}{dynamic}
A3261 Table ‘{table}’ not found; the statement gets SQLCODE -30 when it runs
A3286 ‘{action}’ is not a valid $ZSTRIP action: {reason}
A3473 The length of ‘{name}’ must be a literal or a host variable; the statement fails when it runs
A3485 {function} can’t take the private variable ‘{name}’
A3604 Method ‘{name}’ overrides {cls}’s but {difference}
A3825 Option ‘{option}’ is given twice; TRUNCATE TABLE and LOAD accept each option once
A3850 ${name} is not a recognized function{suggestions}
A3942 MultiDimensional property ‘{name}’ takes a subscript, not empty parentheses
A4025 The callee’s public list names ‘{name}’, which is private here
A4304 {what} is not allowed in {context} (IRIS: {iris})
A4439 Cannot find routine ‘{routine}’ in the workspace or on the IRIS instance
A4652 $ZCONVERT’s fourth argument must be an unsubscripted local variable
A4912 %SAMPLE_PERCENT takes a number greater than 0 and at most 1, not {value}
A4963 Quit inside a loop or Try block takes no value; this one carries {actual}
A4983 Variable ‘{name}’ is already declared
A5086 Label ‘{label}’ is not listed among the applicable tables; the statement gets SQLCODE -23 when it runs
A5090 The macro ‘{name}’ expands recursively without end
A5254 Cannot inherit from final class ‘{cls}’
A5268 {function} takes no by-reference argument
A5272 Cannot change final {kind} ‘{name}’ of {cls}
A5431 A Caché Direct callback raises <_CALLBACK SYNTAX>: IRIS has no client to call
A5523 Too many arguments: the callee takes {takes}
A5789 CONTINUE is not within a loop
A5967 {source} is incompatible with {target}
A6071 Wrong number of arguments: ‘{name}’ takes {takes}; the statement fails when it runs
A6127 Not enough arguments to the macro ‘{name}’, which takes {expected}
A6319 Parameter ‘{name}’ is a constant: it takes no arguments and can’t be assigned
A6418 ‘{name}’ is a {actual}, which cannot serve as a {used}; the statement fails when it runs
A6442 Method ‘{name}’ has the name of a label in include file ‘{include}’, which IRIS refuses (<LABELREDEF>)
A6587 Invalid macro argument: {reason}
A6734 Index option ‘{option}’ is out of order: they go PAD_INDEX, FILLFACTOR, IGNORE_DUP_KEY, DROP_EXISTING, STATISTICS_NORECOMPUTE, each once
A6781 Returns nothing where ‘{wanted}’ is declared
A6851 Cannot find label ‘{label}’ in {routine}
A6866 Cannot NEW the private variable ‘{name}’ in a procedure block
A7095 This value is undefined{expr}
A7139 Only $CASE’s last argument may omit the value before its colon
A7217 An offset cannot enter the procedure block at label ‘{label}’ (IRIS: <NOLINE>)
A7340 Field ‘{field}’ not found in the applicable tables ({tables}); the statement gets SQLCODE -29 when it runs
A7342 Argument {position} of {function} can’t be left empty
A7415 Argument default ‘{default}’ is neither a literal nor an expression in braces, which IRIS refuses (ERROR #5559)
A7461 No superclass of {cls} has a method ‘{method}’ for ##super to call
A7471 No function ‘{name}’: SQL provides no ObjectScript function of that name; the statement fails when it runs
A7604 Label ‘{label}’ has no formal argument list, so $$ cannot call it (IRIS: <PARAMETER>)
A7693 ‘{name}’ has a syntax of its own, which this call does not follow; the statement fails when it runs
A7831 Cannot find include file ‘{name}’ in the workspace or on the IRIS instance
A7895 ‘{format}’ is not a valid $FNUMBER format: {reason}
A8061 Cannot find class ‘{cls}’ in the workspace or on the IRIS instance
A8073 Syntax error {scope}: {detail}
A8496 Property ‘{name}’ is not MultiDimensional, so it takes no subscripts
A8820 SET $VECTOR needs its third argument, the type
A8892 Variable ‘{name}’ is {ty1} in one branch but {ty2} in another
A8914 Cannot reference instance member ‘{name}’ from a class method
A9180 Cannot assign {source} to ‘{name}’ declared as {target}
A9322 ‘{entry}’ is not {kind} keyword IRIS accepts
A9399 ${name} is not a recognized special variable{suggestions}

Warnings

Code Message
A1203 Unreachable: every path before this statement has quit, returned or thrown
A1368 Not in a class context; this relies on $this being set when it runs
A1817 Variable ‘{name}’ is already NEW’d; this NEW discards its current value
A1841 Method ‘{name}’ overrides {cls}’s {difference}
A3236 $CASE without a default raises <ILLEGAL VALUE> when no case matches
A3303 Cannot find routine ‘{routine}’ in the workspace; there is no IRIS environment to check against
A3372 ‘{name}’ is not a parameter of {class}, the type of {of}{hint}
A3717 Class ‘{name}’ is also declared in {other_uri}
A3904 The macro ‘{name}’ is defined in the body of method ‘{method}’, which only the methods compiled after it see
A4344 An error here re-enters the handler {var} still names
A4418 {call} is a legacy $ZUTIL call{replacement}
A4476 Output formal argument ‘{name}’ is never assigned
A4718 Cannot find member ‘{mem}’ in {cls}, an abstract class whose subclass here may have it{suggestions}
A5156 ${function} is documented to take at most {documented} argument(s), but was given {given}; IRIS tolerates the extra
A5579 Passing {actual} argument to ‘{name}’, which is {wanted} formal argument
A5718 Variable ‘{name}’ is assigned but never read
A6194 {what} is not documented, though IRIS compiles it
A6203 ‘{entry}’ is not a class keyword as written, though IRIS compiles it
A6274 Assigning a {source} to ‘{name}’ declared as {target}
A6613 ZQUIT takes an integer of 1 or more; {value} acts as a bare ZQUIT and clears the whole stack
A6627 Host variable ‘:{name}’ is undefined here; embedded SQL reads it as NULL
A6705 Too few arguments: ‘{next_arg}’ may be required
A6826 This ‘{ty}’ value may be undefined{expr}
A7155 ObjectScript evaluates operators strictly left to right, without precedence; this may not compute what you expect
A7408 Label ‘{label}’ is inside braces, where ascot does not follow labels, so the checks after it may be incomplete
A7548 No QUIT or RETURN; execution falls through to what follows
A7731 {value} doesn’t match the pattern of {what}
A8139 {source} is abstract, so this value may not be the {target} it is taken for
A8317 ‘{meta_type}’ is not a recognized parameter type; available: {available}
A8456 This condition is always {value}
A8997 Returns a ‘{actual}’ where no return type is declared
A9241 $SELECT without a default raises <SELECT> when no condition holds
A9421 {value} is a number here, implicitly converted to the string “{value}”
S2839 {kind} {found} should be written {expected}
S3627 Put {wanted} before }
S3918 The style allows {max} New per block; this is one more
S4151 Use Return to leave a method or procedure; Quit is for loops and Try blocks
S4933 Put {wanted} after {
S5260 The style allows {max} command(s) per line; this is one more
S5583 This comma wants {wanted}
S6174 Argument ‘{name}’ has no default but follows one that has
S6307 Put the postconditional on the command keyword, not on its argument
S6829 Indent this line {wanted}, not {found}
S7126 Describe this {kind}: its body is {lines} line(s)
S7442 Join these conditions with {wanted}
S8215 Put {wanted} before {
S9048 Put {wanted} between } and {keyword}

Information

Code Message
A1054 Cannot find class ‘{cls}’ in the workspace or on the IRIS instance
A3794 The labels of routine ‘{routine}’ aren’t known, so calls into it can’t be checked precisely
A3913 {what} is beyond what ascot checks
A4043 Type checking not implemented for ‘{what}’
A4269 {role} ‘{name}’ is never read
A4471 Cannot look up {lookup} on the IRIS instance ({reason}), so it is taken on trust
A4556 Do discards the {class} this call returns
A5213 The label exists, but ascot does not follow the offset, so the call is not checked
A5362 ‘{name}’ is a user-defined command (^%ZLANGC00), so the call is not checked
A5540 Cannot decide {directive} {condition}{expansion} at compile time, so its branch is assumed taken
A6037 ${name} is not documented for IRIS, so the call is not checked
A6204 ‘{name}’ is a ByRef formal argument and gets a copy of the argument: an assignment the callee makes to it stays there, which may be intended
A8172 ascot cannot confirm {what}: the IRIS environment in use carries no SQL names
A9360 Cannot confirm ‘{mem}’ exists on {on}{cls}: its hierarchy includes {unseen}

Hints

Code Message
A1765 A $ETRAP that only jumps to a label is what Set $ZTrap = "{label}" does; $ZTRAP is scoped to this frame, where $ETRAP is inherited by callees
A5780 ZQUIT unwinds here only because this procedure block has no private variables; with any, it fails with <COMMAND>
A5847 {call} is not documented for IRIS; $ZUTIL was superseded by class methods and special variables
A7762 ‘{name}’ is never read before it is assigned; Output fits better than ByRef
A7781 ‘{name}’ is read before it is assigned; ByRef fits better than Output