Command-line argument errors

When an osh command line is being processed, any tokens that do not correspond to an argument description are taken to be error tokens.

An error message is generated for each error token, with the arg token number and text included in the error message. The engine then discards the error token and attempts to process the next argument token according to the argument description.

In a subargument list, an unrecognized argument token terminates the subargument list. The engine then checks any constraints, and processes other subarguments of the enclosing argument list.

When an argument token is seen that matches one of the argument descriptions, subsequent argument tokens are processed using the assumption that the argument has been correctly matched. Any local discrepancies such as a bad value, a bad subargument list, and so on, are reported along with the argument tokens making up the argument being processed and any usage-style information relating to the argument.

When an argument list is terminated, the constraints are checked for such aspects as occurrence restrictions, exclusivity, and implies relationships; and any violations are reported with the appropriate contextual information, including the argument instances involved and appropriate usage-style information describing the violated constraints.

When one or more errors are reported, only argument tokens and usage information specific to the errors at hand are included in the error messages. Whether or not the entire usage string is generated and issued in a summary message is up to you, as is the responsibility of identifying the operator or other context in which the argument-processing error occurred.
Note: When operator execution successfully reaches your override of initializeFromArgs_(), you can be confident that InfoSphere DataStage has found no serious argument-description syntax errors or invalid operator arguments.