<< Click to Display Table of Contents >> Navigation: User guide > Data > Editing data |
Editing data is the process of checking and reporting the presence of errors in the data.
The CK (check) command and the EL (edit and list) command are supplied for you to perform the necessary data checks. The effect of these commands is that, if the data condition being tested is false, a message is output to the Report file and a data error count ($XIERR) incremented for the record. When the data record is written to the IDF, this count is checked, and if it is greater than zero, the record is not written to the file.
You are thus able to ensure that all the data in your IDF is error-free. You may at this point correct the data, and remake the IDF, or you can proceed to execute your tables on just those records that are error-free.
CL supplies a summary of data checks made, showing the incidence of failure for each check at the end of the Report file.
The editing instructions may be set up using the HOLD command instead of CK (check) and EL (edit and list). If a data error condition is found, it is reported at the screen, and you can correct the data on-line, rechecking the record after each correction until it is error-free. Run control parameter NODIS can be used to convert an interactive edit into a report edit. The following CL script checks that data location $120 is blank and that location $245 contains at least one code.
start control,
c=dirty.cba,
finish control,
start data,
serial number in 1-5,
card numbers 1,2 in column 6-7,
ck $120/b,
ck $245/nb,
finish data,