PROCEDURE rap$update_sysfiles_for_archive, updsfa (
  retrieval_precedence, rp: list of key
      (tape, t)
      (cartridge_tape, ct)
      (cartridge_storage_system, css)
      (archive_to_nos, atn)
    keyend = (tape)
  status)

"This procedure copies text into the following file:
"
"  $SYSTEM.PROLOGS_AND_EPILOGS.JOB_ACTIVATION_EPILOG
"
" This text adds the commands necessary to run Archive/VE
" to the  appropriate prologs and epilogs.
"

WHEN any_fault DO
  display_value osv$status o=$response
  EXIT_PROC
WHENEND

SYSTEM_OPERATOR_UTILITY
  TASK r=3
COLLECT_TEXT o=$system.prologs_and_epilogs.job_activation_epilog.$eoi u='**' sm='?'
  VAR
    rav$jobs_recovered: (xref) boolean
  VAREND

  IF NOT rav$jobs_recovered THEN
    deactivate_archive_ve
    TASK r=3
      delete_file f=$system.archive_ve.archive_retrieval_file ..
        status=osv$status
    TASKEND
  IFEND
  activate_archive_ve
  manage_archive_activity list=$null
    change_retrieval_precedence p=?retrieval_precedence?
  quit
**
  TASKEND
QUIT

PROCEND rap$update_sysfiles_for_archive
