! CD_mrg_rpt.scp ! written by A.D. Hull - DEC - (date) ! generate and queue the DTR xxxx report delete_file xxx.RPT purge_file TEMP.DTR form .if oa$form_dispose nes "2" then .goto abort_print display Preparing report files .... this will take some TTIME...please wait force .pause 2 get oa$page_length = "0" get #quote = '"' merge CD_mrg_rpt.dtr, temp.dtr GET OA$DTR = "@TEMP.DTR" GET OA$DTR = ":XXX_PROC_MERGED" .label check_for_file get #print_file = oa$dir:"*.*;*".%WHOLE['XXX.RPT'] .if #print_file nes "" then .goto process_print .goto no_file_found .label process_print form wpparg .if oa$form_dispose nes '2' then .goto abort_print close prior get #queue = #print_printer get oa$dcl = '$ PRINT/DELETE/NONOTIFY/NOIDENT/QUEUE=' #QUEUE '/FORM=L180 ' #print_file get oa$display = 'XXXX Report submitted to print queue ' #queue get #print_printer = #passed_Args = "" .exit .label abort_print DISPLAY Report not printed get #print_printer = #passed_Args = "" .exit .label no_file_found display XXX.RPT file not found .... unable to print report .exit