Previous Topic: Define Clear Screen InputNext Topic: Define Input


Combining Keyword and Positional Parameters

If you mix parameters with a keyword and positional input, you need to be aware of this rule. Positional input counts its position relative to other positional inputs. The following three examples illustrate the rule.

Example 1:

The clear screen input below is acceptable when the employee number (201289), division number (6), and cost center number (739) are the first, second, and third items, respectively, in the parameter list.

<trancode> 201289,6,739

Example 2:

If you add a keyword to the second item (DIV=6), and leave the other items unchanged, you create an error of conflicting unformatted input.

<trancode> 201289,DIV=6,739

Although the first positional parameter is still first, the cost center parameter (739) is now the second positional input field, not the third as it is in the parameter list.

Example 3:

To prevent the error shown in Example 2, code a second comma after the division parameter, as follows:

<trancode> 201289,DIV=6,,739

The second comma acts as the second positional parameter. It also makes the cost center the third positional parameter, as it is in the parameter list.