
PROCEDURE makccu_phase_100, makccu100  (
site_code, qcu: name = $required
status )

crev count
crev work k=string
crev ignore k=status
crev msg k=string
crev qi   k=string v=$string($value(site_code))
crev wev$working_catalog k=string scope=xref
work_path = wev$working_catalog
crev psrs

crev scu_path k=string v='$USER.'//qi//'_scu_base'
crev sc_path k=string v='$USER.'//qi//'_criteria'
crev hdr_path k=string v='.CSERV.CCU.PSRS.HEADER_FILE'
crev trl_path k=string v='.CSERV.CCU.PSRS.TRAILER_FILE'
crev data_file k=string v='$USER.'//qi//'_PSR_BASE'
crev psr_info k=string v='.CSERV.CCU.PSRS.'//qi
crev r1_line k=string v='qcv$psrs_p^.psr_entries['
crev r2_line k=string v= '].psr_ident := '
crev r3_line k=string v='qcv$psrs_p^.psr_entries['
crev r4_line k=string v= '].feature_ident := '

detf $fname(psr_info) status=ignore
delf $fname(data_file) status=ignore
delf $fname(scu_path) status=ignore
delf $fname(sc_path) status=ignore

attf f=$fname(psr_info) op=$asis
copf $fname(hdr_path) $fname(data_file)
putl ' ' o=$fname(data_file//'.$eoi')

    accl v=work i=$fname(psr_info) lc=count
   WHILE count <> 0 DO
    psrs = psrs + 1
    msg = '        '//r1_line//psrs
    msg = msg//r2_line//''''
    msg = msg//$substr(work,8,7)
    msg = msg//''';'
    putl msg o=$fname(data_file//'.$eoi')

    msg = '        '//r3_line//psrs
    msg = msg//r4_line//''''
    msg = msg//$substr(work,36,$strlen(work)-34)
    msg = msg//''';'
    putl msg o=$fname(data_file//'.$eoi')
    putl ' ' o=$fname(data_file//'.$eoi')


    accl v=work i=$fname(psr_info) lc=count
   WHILEND
  putl '  qcv$psrs_p^.item_count := '//psrs//';' o=$fname(data_file//'.$eoi')
 copf $fname(trl_path) $fname(data_file//'.$eoi')


   cresl r=$fname(scu_path)

colt o=$fname(sc_path)
INCM special
**

 delfc $output output
 SCU
   usel b=$fname(scu_path)  r=$fname(scu_path)
   cred d=psr_statistics m=special s=$fname(data_file)
   chad d=psr_statistics g=(oss$source,cybil,osf$system_core_13d) p='cybil'
   quit


 COMS d=psr_statistics ab=$fname(scu_path)  sc=$fname(sc_path) l=l2
 crefc $output output

 detf $fname(data_file) status=ignore
 detf $fname(hdr_path) status=ignore
 detf $fname(trl_path) status=ignore
 detf $fname(scu_path) status=ignore
 detf $fname(obj_path) status=ignore
 detf $fname(sc_path) status=ignore
 delf $fname(scu_path) status=ignore
 delf $fname(obj_path) status=ignore
 delf $fname(sc_path) status=ignore
 delf $fname(data_file) status=ignore
 detf l2

PROCEND makccu_phase_100
