INVALID - connect_cdc_sqdata - Latest

Connect CDC (SQData) Apply engine

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect CDC (SQData)
Version
Latest
Language
English
Product name
Connect CDC (SQData)
Title
Connect CDC (SQData) Apply engine
Copyright
2024
First publish date
2000
ft:lastEdition
2024-07-30
ft:lastPublication
2024-07-30T20:19:56.898694

The INVALID command is used for data cleansing purposes. This command examines source field/columns where invalid data can and frequently does exist (i.e. a character value in a numeric field), especially in IMS, VSAM and Flat File data. The command can specify individual source field/columns and/or ALL source field/columns of either numeric or character datatypes. The latter option is particularly useful for IMS and VSAM source data where numeric columns, particularly those that are packed decimal often contain invalid data.

Syntax
INVALID <source_field> | <source_datastore>.<datatype> SETNULL | SETSPACE | SETZERO | SETFZERO | SET 'constant' |SETEXP | KEEP | EXCEPTION)
Keyword and Parameter Descriptions
Keyword Description
<source_field> | <source_datastore>.<datatype>

Name of a specific source field/column, generally qualified by its description alias, that may contain invalid data for the data type as defined in the corresponding source data structure.

Alternatively, a source datastore and data type ( can be specified which will result in all source fields/columns of all records read for that source datastore to be evaluated for invalid data for the data type as defined in the corresponding source data structure.

SETNULL

Sets the value of the source data field/column to null.

SETSPACE

Sets the value of the source data field/column to spaces.

SETZERO

Sets the value of the source data field/column to a zero (0).

SETFZERO

Sets the value of the source data field/column to a zero point zero (0.0) for floating point data (source description fields containing decimal places) and zero (0) for integers.

SET

'constant' Sets the value of the source data field/column to a the value of the constant.

SETEXP

Specifies that an exception should cause the Apply Engine to terminate. While the effect on processing is the same as would happen without the INVALID command being specified, it indicates that it has been previously determined that the condition cannot be resolved simply by changing the data to a predetermined the value.

KEEP Specifies that the value of the source data field/column will NOT be changed even if it is subject to a subsequent qualifying INVALID command.
EXCEPTION
Allows exceptions to the INVALID rules. For example,
EXTTYPE FINLDGSG.FL-LEDG-DEPOSIT-DATE  DTCIYYMMDD;                 
INVALID FINLDGSG.FL-LEDG-DEPOSIT-DATE  SETNULL EXCEPTION 9999999,  
                         EXCEPTION 0000000;

Specifies that the input date can be 9999999 or 0000000 and not be set to NULL.

Example 1:

Examine the content of source-field1 in source_description using the INVALID command. If an invalid value is found in this field set the value to zero (0) before any action involving the source record takes place including any source to target mapping.
INVALID source_description.source-field1 SETZERO;

Example 2:

Initialize all COBOL source fields in CDCIN defined as zoned numeric or packed decimal to zero.
INVALID CDCIN.ALLNUM SETZERO;
Note: Some targets including SQL Server, require DECIMAL/NUMBER columns with > zero scale to be initialized with 0.0.

Example 3:

Override other qualifying INVALID commands to maintain the content of a specific field in a captured IMS Segment that would otherwise be subject to the SET<value> initialization from Example 2. Note the use of full qualification of the source field name.
INVALID CDCIN.<segment_alias>.source-field KEEP;

Example 4:

Override other qualifying INVALID commands to maintain the content of a specific field in a captured IMS Segment that would otherwise be subject to the SET<value> initialization from Example 2. Note the use of full qualification of the source field name.
INVALID CDCIN.<segment_alias>.source-field KEEP;