Capturing data not processed
The Bad Data adapter command (-BADDATA) can be used for a target (or in a PUT function). If any inserts, updates, or procedure calls fail to execute, the data that could not be processed is written to a file you specify and processing continues.
The -BADDATA command can be specified:
- as part of the setting for a card target
- as part of the command line for a database target referenced in a RUN or PUT function
- on the command line or in a command file.
The rejected record(s) is/are saved in the file specified with the -BADDATA adapter command.
When the -BADDATA adapter command is used and one or more rows are rejected, the database adapter returns an adapter return code of 1 with a message of One or more records could not be processed as shown in the following TargetReport excerpt in the execution summary section:
<TargetReport card="1" adapter="DB" bytes="1218" adapterreturn="1">
<Message>One or more records could not be processed</Message>
<TimeStamp>22:07:32 January 9, 2004</TimeStamp>
</TargetReport>