Informix Error -9051: The number of defined parameters in the ACE program does not equal the number of actual parameters passed to ACEGO on the command line.
Cause and resolution
The number of defined parameters in the ACE program does not equal the number of actual parameters passed to ACEGO on the command line.
The number of parameters that are defined using PARAMETER statements in the DEFINE section does not agree with the number of items that are given as parameters on the command line. Check that parameters that contain spaces or other special characters are enclosed in quotes; the lack of quotes can cause a single parameter to be taken as more than one.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9051 fires when the number of PARAMETER statements defined in the DEFINE section doesn't match the number of items given as command-line parameters — per the official guidance.
- Unquoted parameters containing spaces or other special characters, per the official guidance — the direct, named cause; lack of quoting can cause a single intended parameter to be split into more than one.
Solutions / Resolution
- Check that parameters containing spaces or special characters are enclosed in quotes, per the official guidance.
Examples
An unquoted multi-word parameter
$ sacego myreport Jane Doe -- -9051: "Jane" and "Doe" counted as two parameters
Corrected
$ sacego myreport "Jane Doe"
Diagnostic Checks
- Count the report's defined PARAMETER statements against the command-line arguments actually passed, and quote any parameter containing spaces or special characters.
Related Errors / Related Topics
- -9049 — "A value entered as a command line parameter cannot be converted to the data type type." A related command-line-parameter error, on type conversion rather than count.
The number of command-line parameters didn't match the report's defined PARAMETER count — quote parameters containing spaces or special characters.