The checkpoint facility does not store a record of the contents of files used by a task. Instead, information is stored about the attributes of the files; that is, whether each file is open and the current position of the record pointer for each file. You must plan for the fact that file contents might have been modified, or files might have been removed or replaced, between the time the task was checkpointed and the time it is restarted.
When the task is restarted, each data file must be on the same type of medium as it was when the checkpoint was invoked. They do not have to be on the same physical units or at the same locations on disk. They must retain the same basic characteristics, such as blocking.
If a temporary disk file is open when the checkpoint is invoked, the file is locked and assigned a title that begins with the letters CP. However, the system does not assign this title to the TITLE attribute of the logical file; instead, the TITLE attribute retains whatever value it was assigned by the program. If this file is later locked by the program, the system enters the file in the disk directory under the title specified in the TITLE file attribute. At restart, the process looks for the file only under the CP directory, and the task is suspended with a NO FILE condition.
To prevent this situation, all files that will eventually be locked can be opened as permanent files. That is, the file attribute PROTECTION can be set to SAVE. You can design the task to remove this file later by closing the file with the PURGE option set. Another method of avoiding this problem is never to lock a temporary file.

