{   The purpose of this procedure is to "recover" files following a system crash.
{ This process attempts to leave the file manager tables (path_table,
{ and job_file_table, tape resource tables),
{ the permanent file tables (attached permanent file table,
{ queued catalog table) and set manager tables (job set table, active set table)
{ in a consistant state.
{ . Any permanent file attached at the time of the system failure needs to
{    be reattached.  This is because device management has lost knowledge of
{    those files that are attached on a system wide basis.  Thus the
{    system_file_identifier is incorrect.
{ . If a permanent or tape file is not recovered memory manager is notified
{    to invalidate and inhibit reference to the segment if it was open.
{ . Catalog previously attached must be removed from the job_file_table.
{ . Tape files will be removed, since there is no way of determining the
{    physical position of the tape.
{ . An attempt is made to reclaim tape resources that were in effect before
{   the system failure.  If a fatal reserve error occurs, the job will not recover.
{ . An attempt will be made to detect and report inconsistancies in the
{    tables, such as already locked entries, or the existence of two tables
{    that contain inconsistant entries (for example mis-match between permanent
{    files and file manager).  Often these errors (particularly locked entries)
{    may indicate that the interrupt occurred in the file system, and the
{    process did not rollback/cleanup properly.
{    If the error is in an individual file entry processing will continue,
{    and normal job termination is possible.
{
{ . This revision does NOT deal with:
{    - Catalog changes
{    - File damaged attributes
{    - Updating and correcting of eoi
{    - What to do with the task file table, and open files
{      If we get rid of the global file information during this, and close
{        wants to update GFI.
{    - Use of statistics to report occurences, etc.
{    - Use of condition handling to rollback
{    - Verification that all job_file_table entries have been "recovered"
{    - When removing a mounted tape, it might be nice to inform the operator.
{
{  This assumes:
{  - There has been no permanent file activity prior to this point in the job
{    since the system crash.
{  - While this process is executing there will be no other task attempting
{    access to the tables.  The determination of whether this is
{    the job monitor task is made OUTSIDE of this procedure.
{    The suspension of the non job monitor tasks is done outside of this
{    routine.
{  - All rollback in file manager, in ALL tasks has completed at this
{    time.
{  - Permanent file recovery, validation, and reconciliation has already run.
{
{   FMP$RECOVER_JOB_FILES (STATUS)
{
{  STATUS: (output) This parameter returns the request status.
{     The conditions:
{
{     ose$job_severely_damaged
{       indicates that the job recovery process detected something of severe
{       enough magnitude that the tables could not even be read.
{
{     ose$path_table_locked
{       indicates that an error has occurred in file manager, and that
{       rollback has not worked correctly.
{
{       Normal job termination may NOT be done to clean this up.
{       IF some permanent files were already reattched and this severe
{         condition is detected, these files will not be detached.  Subsequent
{         attaches will (eventually) see that this job is NOT found, and
{         delete the entry in the catalog, on cycle busy.  Subsequent
{         PF recoveries will also delete this "dead" jobs attachment to the
{         file.
{
{     When the following conditions occur normal job termination may proceed:
{
{     pfe$not_all_pfs_recovered, fme$not_all_pfs_recovered
{       indicates that not all permanent files were
{       reattachable.  The tables are left in a consistant state, however,
{       and normal job termination may be completed.
{     fme$tape_files_not_recovered indicates that the job was using tape
{       files at the time of the system failure.
{       The previous errors takes precedence over the occurrence of
{       this error.
{     fme$Not_all_files_recovered
{       indicates that a file of indeterminate type could not be reattached.
{       Example:  path table locked
{                 (or should this be a severely damaged ?)
{     fme$tape_resource_not_recovered
{       Indicates a fatal error occurred when attempting to reclaim tape
{       resources that were a result of a RESERVE_RESOURCE command.
{       The error fme$tape_files_not_recovered takes precedence over this.
{
{     fme$multiple_job_recoveries
{       Indicates that the job recovery condition occurred while in the
{       middle of this recovery.
