Using REPLACE

For non-PDS classes, you can issue COFCREAT with the REPLACE option. If you specify REPLACE, VLF does not require that COFRETRI precede COFCREAT. Because VLF cannot then guarantee that the source object has not changed, your application must ensure that the source object remains unchanged between the time when you reference the source object to create the object parts list and the time when you receive control back from COFCREAT.

If you issue COFCREAT without REPLACE for an object that already exists in VLF storage, VLF returns a successful completion code but does not replace the data object. In this case, VLF assumes that the data object you supply is identical to the data object that already exists in VLF storage.

If you issue COFCREAT with REPLACE for an object that already exists in VLF storage, VLF does replace the existing object with the parts specified in the object parts list. In this case, VLF assumes that the data object you supply is more current than the data object that already exists in VLF storage.