The C$KEYPROGRESS routine is used in a USE FOR REPORTING declarative procedure to obtain information about the progress of the system when it is adding keys to a file open for BULK-ADDITION.
CALL "C$KEYPROGRESS" 
    USING KEYPROGRESS-DATA
               	 | KEYPROGRESS-DATA Group item as follows: | 01  KEYPROGRESS-DATA, SYNC.
    03  KEYPROG-CUR-KEY    PIC XX COMP-N.
    03  KEYPROG-NUM-KEYS   PIC XX COMP-N.
    03  KEYPROG-CUR-REC    PIC X(4) COMP-N.
    03  KEYPROG-NUM-RECS   PIC X(4) COMP-N.This item holds the results of the C$KEYPROGRESS routine call. A copy of this data item can be found in the COPY library keyprog.def. | 
When you call C$KEYPROGRESS from inside a USE FOR REPORTING declarative procedure, the KEYPROGRESS-DATA group item is filled in with information about the progress the runtime is making in adding keys to a file that has been opened for BULK-ADDITION. Calling C$KEYPROGRESS at any other time has undefined effects.
The individual fields of the group item hold the following information:
| KEYPROG-CUR-KEY | this is the current key being worked on by Vision. The primary key is key 1, the first alternate is key 2, and so on. | 
| KEYPROG-NUM-KEYS | this is the total number of keys in the file. | 
| KEYPROG-CUR-REC | this is the number of the last record written for the current key, ranging from 1 to the total number of records to write. | 
| KEYPROG-NUM-RECS | this is the total number of records to be keyed. | 
For more information about how and when to use C$KEYPROGRESS, see the topic Bulk addition mode for Vision in the ACUCOBOL-GT User's Guide.