The MESSAGESEARCHER statement returns a completed output message based on the information passed to it.
<messagesearcher statement>
── MESSAGESEARCHER ── ( ──<output message array identifier>── [ ───────► ►─┬───────────────────────────────┬─<arithmetic expression>── ] ── , ──► └─<language specification>── , ─┘ ►─<result pointer>── , ──<result length>───────────────────────────────► ►─┬──────────────────────────────┬─ ) ─────────────────────────────────┤ │ ┌◄─────────────────────────┐ │ └─┴─ , ──<parameter element>─┴─┘
<language specification>
──┬─<string expression>──────────────────────────────────┬─────────────┤ └─<pointer expression>── FOR ──<arithmetic expression>─┘
<result pointer>
──<pointer expression>─────────────────────────────────────────────────┤
<result length>
──<variable>───────────────────────────────────────────────────────────┤
<parameter element>
──┬─<string expression>──────────────────────────────────┬─────────────┤ └─<pointer expression>── FOR ──<arithmetic expression>─┘
The output message array identifier indicates the output message array from which the output message is to be obtained. For more information on output message arrays, see OUTPUTMESSAGE ARRAY Declaration.
The language specification indicates the preferred language for the requested output message. The language specification must not have a trailing dot.
The arithmetic expression within the square brackets ([ ]) indicates the output message number of the message that is to be completed. The arithmetic expression cannot be a double-precision value.
The result pointer is a call-by-value EBCDIC pointer that points to where the completed output message is to be stored. An EBCDIC null character (48"00") is placed after the last character of the message. The null character is not included in the returned message length.
The result length is an integer or real variable that is assigned the length of the returned output message, not counting the null character that is appended at the end.

