Dataloader/MP Reference Manual
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to DataLoader/MP
- 2 DataLoader/MP Components
- 3 Running DataLoader/MP
- 4 Specifying File-Related Options for DataLoader/MP
- 5 Creating a Customized Version of DataLoader/MP
- User Exits
- User Exit Descriptions
- BUILDKEY
- CHECKARG
- CONVERTIT
- DELETEIT
- DONEWITHTRANSACTION
- EXITSDESCRIPTION
- GETNEXTRECORD
- INITIALIZE1
- INITIALIZE2
- INSERTIT
- INSTRUCTIONS
- MISC1, MISC2, MISC3, and MISC4
- NEWTRANSACTION
- NEXTINDIRECTFILE
- SKIPPING
- STATISTICSTIME
- TERMINATING
- T0330U00_DEFAULTEXITS_C
- T0330U00-DEFAULTEXITS-COBOL
- T7900D41_DEFAULTEXITS_C
- T7900V00-DEFAULTEXITS-COBOL
- UPDATEIT
- Default User Exits
- DataLoader/MP Library
- The MAKE Routine for NM DataLoader/MP
- The MAKE Routine for Nonnative Mode DataLoader/MP
- 6 DataLoader/MP Examples
- 7 Recovery Strategies
- A Error and Warning Messages
- B Processing Flowcharts
- C C-Only Error Functions
- Index
Recovery Strategies
DataLoader/MP Reference Manual—424148-003
7-6
Restarting From a Known State
UPDATE
=SALESTABLE
SET
LOAD_ID = :CurLoadID,
RECORD_NUM = :CurRecordNum,
SALES_THIS_YEAR = SALES_THIS_YEAR + :SalesThisWeek
WHERE
LOAD_ID < :CurLoadID
AND
RECORD_NUM < :CurRecordNum
AND
PART_NUM = :PartNum
While this scenario will work, it requires space for the RECORD_NUM column.
Finally, you can create a load program that accepts a parameter that indicates whether
it is a rerun or not, and the load program executes different code each case.
Restarting From a Known State
Restarting from a known state has fewer limitations than the restarting from an
unknown state method and requires no specific application coding to implement it. This
method has two limitations:
•
The table must be under Transaction Management Facility (TMF) protection.
•
The input data to the load must be available again in exactly the same order.
The Transaction Management Facility is crucial to restarting from a known state. If you
specify the -T parameter when you run DataLoader/MP, TMF packages changes to the
table in transactions. If a failure occurs, TMF rolls back any changes made since the
last committed transaction, putting the table into a known state.
To determine the last transaction performed and at what point the restart should begin,
you can request that DataLoader/MP keep information about the last committed
transaction. That transaction is the one that defines the state of the table in a restart
file. The syntax for this command is:
-T=num(restartfile=restart-file)
DataLoader/MP records information about the last committed transaction in restart-file.
When you start DataLoader/MP a second time, it checks for the existence of the restart
file. If the restart file exists, DataLoader/MP reads the restart file, positions itself in the
input file to the record number of the input file that is recorded in the restart file, and
starts normal processing with the first record after the last one in the last committed
transaction. If the restart file does not exist, DataLoader/MP creates the restart file and
starts processing with the first record in the input.
Purging the Restart File
Before you purge the restart file, consider the following. Because of the way
DataLoader/MP handles input and output, it is possible for DataLoader/MP to
successfully end without processing all of its input data.