PROC make_qcu_phase_11, makqcu11 (
  qcu_ident, qi: name = $required
  check, c: VAR of boolean
  status )

crev ignore k=status
crev wev$working_catalog k=string s=xref
crev stop k=boolean v=FALSE

crev w_path k=string v='.'//$job(user)//'.'//$value(qcu_ident)//'_WC.$ASIS'

crev l_path k=string v= wev$working_catalog//'.OBJECT'

crev a_path k=string v= wev$working_catalog//'.OBJECT.MAINTENANCE'
     a_path = a_path//'.QCF$BASE_PRODUCT_TABLE'

crev b_path k=string v= wev$working_catalog//'.OBJECT.MAINTENANCE'
     b_path = b_path//'.QCF$QCU_PRODUCT_TABLE'

putl ' '
putl ' '
putl ' Leveling the Platform Environment'

detf $fname(a_path) status=ignore
detf $fname(b_path) status=ignore
delf f=($fname(a_path),$fname(a_path//'.$low'),$fname(a_path//'.$low')) status=ignore
delf f=($fname(b_path),$fname(b_path//'.$low'),$fname(b_path//'.$low')) status=ignore

check = FALSE

stop = $file($fname(l_path),catalog)


IF NOT stop THEN
putl '-'
putl '-'
putl '                        ABORTING '
putl ' '
putl ' There is no OBJECT subcatalog in the working catalog specified.'
putl ' It will be necessary to compile any modules that comprise QCU'
putl ' '//$string(qcu_ident)//' before attempting another MAKQCU. The other possibility'
putl ' is that the working environment specifies an inappropriate value'
putl ' for working catalog.'
putl '-'

$value(check) = TRUE
EXIT_PROC
IFEND


delf $fname(w_path) status=ignore

disc $fname(l_path) o=$fname(w_path)
detf $fname(w_path) status=ignore
attf $fname(w_path) status=ignore
crev count  v=1
crev work k=string
WHILE count > 0 DO
accl v=work i=$fname(w_path) lc=count
IF count = 0 THEN
   EXIT
IFEND

IF $substr(work,5,5) = 'FILE:' THEN
 delf $fname(l_path//'.'//$substr(work,11,$strlen(work)))
IFEND
WHILEND

delf $fname(w_path) status=ignore



PROCEND make_qcu_phase_11
