CSIndex is a utility that creates index files (.csidx) for data files. It identifies duplicate case IDs if they exist within one or more data files and, optionally, removes duplicate cases.
Data files and lookup files must have a corresponding index file in order to be properly loaded by a data entry application and by some Tools. When you run a data entry application, CSEntry automatically creates an index file when loading a data file if the index file does not exist or if the data file is more recent than the existing index file. You can also use CSIndex to create this index file if it does not exist. (Note that batch and tabulation applications do not require data files to have corresponding index files.)
The utility is useful for removing duplicate cases from a data file because an index cannot be created for a file if duplicate cases exist. In this respect, CSIndex has three modes of operating:
- Output information to list file only (default option): CSIndex will display information about all duplicates in the generated listing file.
- Prompt to delete duplicates: CSIndex will bring up a window that shows the duplicate case ID(s) and will request that the user specify which case to keep in the data file.
- Delete duplicates automatically: CSIndex will keep the first instance of a case within the data file and delete each subsequent case sharing the same case ID.
CSIndex can operate on one or more data files. When more than one input file is selected, CSIndex operates slightly differently from its behavior for one file. CSIndex attempts to create a temporary "global index" with the case IDs from each data file checked against the case IDs of the other files. This is useful for checking whether duplicate cases exist across several data files, and deleting specific cases if desired.