In those components in which a transformations are defined, some return values can also be defined. They are integer numbers greater than, equal to or less than 0.
Note | |
---|---|
Remember that DBExecute can also return integer values less than 0 in form of SQLExceptions. |
Positive or zero return values
ALL = Integer.MAX_VALUE
In this case, the record is sent out through all output ports. Remember that this variable does not need to be declared before it is used. In CTL, ALL
equals to 2147483647
, in other words, it is Integer.MAX_VALUE
. Both ALL
and 2147483647
can be used.
OK = 0
In this case, the record is sent out through single output port or output port 0 (if component may have multiple output ports, e.g. Reformat, Rollup, etc. Remember that this variable does not need to be declared before it is used.
Any other integer number greater than or equal to 0
In this case, the record is sent out through the output port whose number equals to this return value. These values can be called Mapping codes.
Negative return values
SKIP = - 1
This value serves to define that error has occurred but the incorrect record would be skipped and process would continue. Remember that this variable does not need to be declared before it is used. Both SKIP
and -1
can be used.
STOP = - 2
This value serves to define that error has occurred but the processing should be stopped. Remember that this variable does not need to be declared before it is used. Both STOP
and -2
can be used.
Important | |
---|---|
The same return value is |
Any integer number less than or equal to -1
These values should be defined by user as described below. Their meaning is fatal error. These values can be called Error codes.
Important | |
---|---|
|
Important | |
---|---|
You should also remember that if graph fails with an exception or with returning any negative value less then -1, no record will be written to the output file. If you want that previously processed records are written to the output, you need to return SKIP (-1). This way, such records will be skipped, graph will not fail and at least some records will be written to the output. |