PROC makqcu_phase_3, makqcu3 (
qcu: name = $required
delivery_medium, dm:  boolean
status )


crev qev$psr k=string s=xref
crev ignore k=status
crev qi k=string v=$string($value(qcu))
crev work k=string
crev wev$working_catalog k=string s=xref

crev c_path k=string v='.'//$job(user)//'.'//$strrep(qi)//'_BACKUP'
crev t_path k=string v='.'//$job(user)//'.'//$strrep(qi)//'_TEMP'

crec $fname(c_path) status=ignore

"*************************************************************************
" This section establishes variables and the environment for this proc
" and cleans up the post-build environment.
"*************************************************************************


crev pa_path k=string v='.'//$job(user)//'.'//$strrep(qi)//'_PA'
crev pb_path k=string v='.'//$job(user)//'.'//$strrep(qi)//'_PB'
crev qf_path k=string v='.'//$job(user)//'.'//$strrep(qi)//'_QF'
crev cf_path k=string v='.'//$job(user)//'.'//$strrep(qi)//'_CF'
crev new_pac k=string v=wev$working_catalog//'.OBJECT.MAINTENANCE'
crev df_path k=string v='.'//$job(user)//'.'//$strrep(qi)//'_DF'
crev qcu_path k=string v='.'//$job(user)//'.'//$strrep(qi)//'_QCU'
crev na_path k=string v='.'//$job(user)//'.'//$strrep(qi)//'_NAMES'
crev pl_path k=string v='.'//$job(user)//'.'//$strrep(qi)//'_PL'
crev psr_path k=string v=':CSERV.ARHOPS.'//qev$psr


crev cp_path k=string v='.'//$job(user)//'.'//$strrep(qi)//'_QCU.DISK_FILE'
crev qn_path k=string v='.'//$job(user)//'.'//$strrep(qi)//'_QCU.NAMES'
crev li_path k=string v='.'//$job(user)//'.'//$strrep(qi)
     li_path = li_path//'_FC.LINK_INPUT_FILES'


crec $fname(qcu_path) status=ignore
copf $fname(df_path) $fname(cp_path)
copf $fname(na_path) $fname(qn_path)


delf $fname(new_pac//'.RAF$PRODUCT_TABLE') status=ignore
delf $fname(new_pac//'.RAF$QCU_PRODUCT_TABLE') status=ignore
"******************************************************************************
"
" Copy the new QCU catalog to the CSERV debug_tables catalog for future use
"******************************************************************************
work = 'BACPF,l=$null,BF='//$strrep(t_path)
work = work//'; BACC '//li_path
work = work//'; BACF '//na_path
work = work//'; BACF '//pl_path
work = work//'; QUIT'
incl work

rewf $fname(t_path) status=ignore
copf $fname(t_path) $fname(psr_path)
delf $fname(t_path) status=ignore
delcc $fname(c_path) status=ignore
delc $fname(c_path) status=ignore
putl ''
putl ' Moving QCU History files from'
putl '        '//$translate(ltu,qcu_path)
putl '               to'
putl '   '//$translate(ltu,psr_path)
putl ''
putl ''


delcc $fname(pa_path) status=ignore
delc  $fname(pa_path) status=ignore
delf $fname(cf_path) status=ignore
delf $fname(qf_path) status=ignore
delcc $fname(pb_path) status=ignore
delc $fname(pb_path) status=ignore
delcc $fname(qcu_path) status=ignore
delc $fname(qcu_path) status=ignore
delcc $fname(li_path) status=ignore
delc $fname(li_path) status=ignore


  makqcu4,$value(qcu),$value(delivery_medium)


PROCEND makqcu_phase_3
