Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ABMDRDBQ

ABMDRDBQ.m

Go to the documentation of this file.
  1. ABMDRDBQ ; IHS/ASDST/DMJ - DOUBLE QUEING SHELL HANDLER ;
  1. ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
  1. ;Original;TMD;03/25/96 11:32 AM
  1. ;;
  1. ;IHS/DSD/DMJ - 3/22/1999 - NOIS HQW-0399-100107 Patch 1
  1. ; Modified check to IOT to allow 'virtual' terminals
  1. ;
  1. ; VARIABLES NEEDED BY PASSING PROGRAM
  1. ;(to change to your name space replace all 'ABM' with your 'NAME SPACE' ... be sure to watch how the variables map with your existing routines)
  1. ; mandatories
  1. ;
  1. ; ABMQ("RC")-compute routine (required for double queuing. If not present ABMQ("RP") will still be queued with ABMQ("ION"))
  1. ; ABMQ("RP")-print routine
  1. ; ABMQ("RX")-exit routine that cleans variables
  1. ; ABMQ("NS")-name space of variables to auto load in ZTSAVE("NS*")=""
  1. ;
  1. ; optionals
  1. ;
  1. ; ABMQ("ION")-forced printer ION with _";"_ characteristics
  1. ; ABMQ("IOPAR") = IOPAR of preselected device
  1. ; ABMQ("FQ")=1 force queuing
  1. ; ABMQ("SL")=1 - if slave printing is allowed when queuing
  1. ; ABMQ("DTH")=FM date time of computing/printing .. or .. =$H
  1. ;
  1. SET ;SET UP ABMQ VARIABLES
  1. S ABMQ("RC")=$G(ABMQ("RC")),ABMQ("NS")=$G(ABMQ("NS")),ABMQ("X")="ZTSAVE("""_ABMQ("NS")_"*"")"
  1. ;
  1. DEV1 ;>Select Device
  1. W !! S %ZIS="NPQ",%ZIS("A")="Output DEVICE: " D ^%ZIS
  1. I $G(POP)!'$D(IO) S DUOUT="" W !,"REPORTING ABORTED",!,*7 G END ;--->
  1. S ABMQ("ION")=ION_";"_IOST_";"_$S($D(ABM(132)):132,1:80)_";"_IOSL
  1. I $D(IO("DOC")) S ABMQ("ION")=$P(ABMQ("ION"),";",1,2),$P(ABMQ("ION"),";",3)=IO("DOC")
  1. S ABMQ("IO")=IO,ABMQ("IOPAR")=$G(IOPAR),ABMQ("CPU")=$G(IOCPU),ABMQ("IOT")=IOT
  1. I $D(IO("Q")),IO=IO(0),'$G(ABMQ("SL")) W !,"Queing to slave printer not allowed ... Report Aborting" G END ;--->
  1. I $D(ABM(132)) D ^ABMDR16 Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
  1. ;
  1. QUE1 ;que
  1. I IO'=IO(0) D K IO("Q"),ABMQ,ABM,ABMD Q
  1. .S ZTDESC="Double Que Computing "_ABMQ("RC")_" "_ABMQ("RP"),ZTRTN="DEQUE1^ABMDRDBQ"
  1. .S:$D(ABMQ("DTH")) ZTDTH=ABMQ("DTH") S:ABMQ("CPU")]"" ZTCPU=ABMQ("CPU") S ZTSAVE("ABM*")="" S:ABMQ("NS")]"" @ABMQ("X")=""
  1. .D ^%ZTLOAD
  1. .W:$G(ZTSK) !,"Task # ",ZTSK," queued.",!
  1. .W:'$G(ZTSK) !,*7,"REPORTING ABORTED"
  1. .D EOP^ABMDUTL(1)
  1. .D HOME^%ZIS
  1. ;
  1. SLAVE ;OPEN SLAVE DEVICE
  1. I $D(IO("S")) S IOP=ION D ^%ZIS
  1. ;
  1. DEQUE1 ;EP ;> 1st deque | do computing routine
  1. ;
  1. D:ABMQ("RC")]"" @(ABMQ("RC"))
  1. D @(ABMQ("RP"))
  1. I $E(IOST)="C" D I 1
  1. .Q:IOT'["TRM"
  1. .Q:$D(ZTQUEUED)
  1. .Q:$D(IO("S"))
  1. .Q:$D(DTOUT)!($D(DIROUT))!($D(DUOUT))
  1. .W ! S DIR(0)="FO",DIR("A")="(REPORT COMPLETE)" D ^DIR K DIR
  1. E W !!,"E N D O F R E P O R T" W:$Y $$EN^ABMVDF("IOF")
  1. D 10^ABMDR16:$D(ABM("PRINT",16))
  1. I $D(IO("S")) D ^%ZISC ;> close slave printer
  1. ;
  1. ;--------
  1. END ;EP ;> cleanup
  1. ;
  1. D @(ABMQ("RX")) ;>perform cleanup
  1. I $D(ZTQUEUED) D KILL^%ZTLOAD
  1. K ABMQ,ZTSK
  1. Q