The OUTMSG function provides the ability to display the contents of a text string, source field, variable or the result of a function in the Integration Engine report output. You can also set a return code that instructs the Integration Engine whether to stop or continue processing. The OUTMSG function is useful for debugging problems with source data and/or with the logic within an Connect CDC (SQData) script.
Category
Specialized
Syntax
OUTMSG(rc, 'text_string ' | source_field | function)
or
OUTMSG(0,STRING( 'text_string ', source_field | function [,'text_string ', source_field | function]))
Parameters and Descriptions
Parameter | Description |
---|---|
rc | A user specified return code. A zero (0) return code specifies that the Integration Engine is to continue processing after the OUTMSG function is executed. A non-zero return code will instruct the Integration Engine to terminate with a return code equal to what you have specified in rc. |
text string | One (1) or more text strings, enclosed in single quotes (') that will be displayed. |
source_field | This parameter specifies one (1) or more source data fields. The contents of the field(s) will be displayed. |
function | This parameter specifies one (1) or more complete Connect CDC SQData functions. The result of the functions will be displayed. |
Example 1
IF RIGHT(SRC_FLD1, 2) = 'A'
{
OUTMSG(0, 'SOURCE CONDITION MET')
}
Example 2
IF SRC_FLD1 < '5'
{
OUTMSG(0, STRING('TEMP VAR = ', TEMP_VAR))
}
In order to determine which input record contains unexpected data in source field SRC_FLD1, display the message UNEXPECTED DATA VALUE FOUND, along with the contents of SRC_FLD1 when the field is not numeric.
IF ISNUM(SRC_FLD1) = 1
{
MAP(SRC_FLD1, 'TGT_FLD1')
}
ELSE
{
OUTMSG(8, STRING('UNEXPECTED DATA VALUE FOUND' , SRC_FLD1))
}