DLQ rules table conventions on IBM i
The IBM i dead-letter queue rules table must adhere to specific conventions regarding its syntax, structure, and contents.
- A rules table must contain at least one rule.
- Keywords can occur in any order.
- A keyword can be included once only in any rule.
- Keywords are not case sensitive.
- A keyword and its parameter value must be separated from other keywords by at least one blank or comma.
- Any number of blanks can occur at the beginning or end of a rule, and between keywords, punctuation, and values.
- Each rule must begin on a new line.
- For portability, the significant length of a line must not be greater than 72 characters.
- Use the plus sign (+) as the last non-blank character on a line to indicate that the rule continues from the first non-blank character in the next line. Use the minus sign (-) as the last non-blank character on a line to indicate that the rule continues from the start of the next line. Continuation characters can occur within keywords and parameters. For example:
APPLNAME('ABC+ D')results in 'ABCD'.APPLNAME('ABC- D')results in 'ABC D'.- Comment lines, which begin with an asterisk (*), can occur anywhere in the rules table.
- Blank lines are ignored.
- Each entry in the DLQ handler rules table comprises one or more keywords and their associated parameters. The parameters must follow these syntax rules:
- Each parameter value must include at least one significant character. The delimiting quotation marks in values enclosed in quotation marks are not considered significant. For example, these parameters are valid:
FORMAT('ABC') 3 significant characters FORMAT(ABC) 3 significant characters FORMAT('A') 1 significant character FORMAT(A) 1 significant character FORMAT(' ') 1 significant character These parameters are invalid because they contain no significant characters:
FORMAT('') FORMAT( ) FORMAT() FORMAT - Wildcard characters are supported. We can use the question mark (?) in place of any single character, except a trailing blank. We can use the asterisk (*) in place of zero or more adjacent characters. The asterisk (*) and the question mark (?) are always interpreted as wildcard characters in parameter values.
- We cannot include wildcard characters in the parameters of these keywords: ACTION, HEADER, RETRY, FWDQ, FWDQM, and PUTAUT.
- Trailing blanks in parameter values, and in the corresponding fields in the message on the DLQ, are not significant when performing wildcard matches. However, leading and embedded blanks within strings in quotation marks are significant to wildcard matches.
- Numeric parameters cannot include the question mark (?) wildcard character. We can include the asterisk (*) in place of an entire numeric parameter, but the asterisk cannot be included as part of a numeric parameter. For example, these are valid numeric parameters:
MSGTYPE(2) Only reply messages are eligible MSGTYPE(*) Any message type is eligible MSGTYPE('*') Any message type is eligible However, MSGTYPE('2*') is not valid, because it includes an asterisk (*) as part of a numeric parameter.
- Numeric parameters must be in the range 0-999 999 999. If the parameter value is in this range, it is accepted, even if it is not currently valid in the field to which the keyword relates. We can use symbolic names for numeric parameters.
- If a string value is shorter than the field in the MQDLH or MQMD to which the keyword relates, the value is padded with blanks to the length of the field. If the value, excluding asterisks, is longer than the field, an error is diagnosed. For example, these are all valid string values for an 8-character field:
'ABCDEFGH' 8 characters 'A*C*E*G*I' 5 characters excluding asterisks '*A*C*E*G*I*K*M*O*' 8 characters excluding asterisks - Strings that contain blanks, lowercase characters, or special characters other than period (.), forward slash (?), underscore (_), and percent sign (%) must be enclosed in single quotation marks. Lowercase characters not enclosed in quotation marks are folded to uppercase. If the string includes a quotation mark, two single quotation marks must be used to denote both the beginning and the end of the quotation. When the length of the string is calculated, each occurrence of double quotation marks is counted as a single character.
Parent topic: The DLQ handler rules table on IBM i