PROC compile_verify_validation_name, comvvn (
  list, l               : file = $list
  alternate_catalog, ac : file = $optional
  status                : var of status = $optional
  )


*IF $variable(wev$proc_doc,declared)<>'UNKNOWN'

"The purpose of this request is to compile the AVM$VERIFY_VALIDATION_NAME source deck
"(found on the source library under the SITE_OS_MAINTENANCE catalog) and place
"the resulting binary onto OSF$BOUND_JOB_TEMPLATE_23D (also under the
"SITE_OS_MAINTENANCE catalog).  The presence of the library
"OSF$BOUND_JOB_TEMPLATE_23D under the SITE_OS_MAINTENANCE catalog causes the
"load module AVM$VERIFY_VALIDATION_NAME to be automatically merged onto the released
"OSF$BOUND_JOB_TEMPLATE_23D upon the next execution of MAKE_VE_DEADSTART_FILE.
"
"If the OS files have been installed to an alternate catalog this should be
"specified by the ALTERNATE_CATALOG parameter.
*IFEND


  create_variable bound_job_template_23d k=string v='$system.site_os_maintenance.osf$bound_job_template_23d'
  create_variable maintenance_source_library k=string v='$system.site_os_maintenance.source_library'
  create_variable binary_output k=string v='$local.'//$unique
  create_variable compile_file k=string v='$local.'//$unique
  create_variable compile_source k=string v='$local.'//$unique
  create_variable ignore_status k=status
  create_variable local_status k=status
  create_variable osf$program_interface k=string v='$system.cybil.osf$program_interface'
  create_variable osf$subsystem_interface k=string v='$system.cybil.osf$subsystem_interface'


  IF $specified(alternate_catalog) THEN
    bound_job_template_23d = $string($value(alternate_catalog)) // ..
          '.site_os_maintenance.osf$bound_job_template_23d'
    maintenance_source_library = $string($value(alternate_catalog)) // '.site_os_maintenance.source_library'
  IFEND

COLLECT_TEXT o=$fname(compile_file) until='END_COLLECT'
  source_code_utility
    use_library b=$fname(maintenance_source_library) r=$null
    expand_deck d=avm$verify_validation_name c=$fname(compile_source) ab=($fname(osf$program_interface) ..
          $fname(osf$subsystem_interface))
  quit

  cybil i=$fname(compile_source) b=$fname(binary_output) l=$value(list) opt=high rc=none da=none

  create_object_library
    IF $file($fname(bound_job_template_23d) assigned) AND ($file($fname(bound_job_template_23d) size) > 0) THEN
      add_modules l=$fname(bound_job_template_23d)
    IFEND
    combine_module l=$fname(binary_output)
    generate_library l=$fname(bound_job_template_23d//'.$next')
    put_line ' Compiled to '//$string($fname(bound_job_template_23d//'.$high')) o=$response
  quit
END_COLLECT

  include_file $fname(compile_file) status=local_status

  detach_file $fname(bound_job_template_23d) status=ignore_status
  detach_file $fname(maintenance_source_library) status=ignore_status
  detach_file $fname(binary_output) status=ignore_status
  detach_file $fname(compile_file) status=ignore_status
  detach_file $fname(compile_source) status=ignore_status
  detach_file $fname(osf$program_interface) status=ignore_status

  EXIT_PROC WITH local_status

PROCEND compile_verify_validation_name
