Organize codes and enable canceled jobs to be processed like finished jobs