How to: |
MODIFY requests read and process transaction data sources from the first record to the last. The START statement signals requests to read starting from a particular record in the data source. The STOP statement signals requests to stop reading at a particular record in the data source. You may use START and STOP statements to process transaction data sources in sections, to resume processing a transaction data source after a system crash, and to test a new request on a limited number of transactions.
START n
where:
Is the number of the first physical record to be processed by the request.
The syntax for the STOP statement is
STOP n
where:
Is the number of the last physical record to be processed by the request.
The START and STOP statements may appear anywhere in the request.
For example, the following request reads 300 records from a transaction data source (ddname SALDATE) starting from the 201st record until the 500th.
MODIFY FILE EMPLOYEE START 201 STOP 500
FIXFORM EMP_ID/9 CURR_SAL/8 MATCH EMP_ID ON NOMATCH REJECT ON MATCH UPDATE CURR_SAL DATA ON FIXSAL END
Note that the numbers are that of physical records, not logical records, and that a request reads four physical records as one logical record. Assume each input record consists of four physical records. For example, if you want the request to read the data source starting from after the first ten transactions, type the START statement as
START 41
because 10 transactions are made up of 40 physical records.
If you are processing a large transaction data source, you may divide the processing into steps using the START and STOP statements. At the completion of each step, make a backup copy of the data source. If a step is aborted for any reason, you can use the last backup to restore the data source.
These two requests are the same. The first processes transactions 1 to 100,000. The second processes transactions 100,001 to 200,000:
MODIFY FILE EMPLOYEE START 1 STOP 100000 FIXFORM EMP_ID/9 CURR_SAL/8 MATCH EMP_ID ON MATCH UPDATE CURR_SAL ON NOMATCH REJECT DATA ON FIXSAL END
MODIFY FILE EMPLOYEE START 100001 STOP 200000 FIXFORM EMP_ID/9 CURR_SAL/8 MATCH EMP_ID ON MATCH UPDATE CURR_SAL ON NOMATCH REJECT DATA ON FIXSAL END
|
Information Builders |