- XBDBQDOC ; IHS/ADC/GTH - DOUBLE QUEUING SHELL HANDLER DOCUMENTATION ; [ 02/07/97 3:02 PM ]
- ;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
- ;
- ;----------------------
- ;NOTES FOR PROGRAMMERS|
- ;----------------------
- ;
- ; %ZIS with "PQM" is called by XBDBQUE if '$D(XBIOP).
- ;
- ; The user will be asked to queue if queuing has not been
- ; selected.
- ;
- ; IO variables as necessary are automatically stored.
- ;
- ; XBxx variables are killed after loading into an XB array.
- ;
- ; XBDBQUE can be nested.
- ;
- ; The compute and print phases can call XBDBQUE individually
- ; (XBIOP is required).
- ;
- ; The appropriate %ZTSK node is killed.
- ;
- ;EX:
- ; S XBRC="C^AGTEST",XBRP="P^AGTEST",XBRX="END^AGTEST",XBNS="AG"
- ; D ^XBDBQUE ;handles foreground and tasking
- ; Q
- ;
- ; VARIABLES NEEDED FROM CALLING PROGRAM
- ;
- ;MANDATORY
- ; EITHER XBRC-Compute Routine or XBRP-Print Routine.
- ;
- ;OPTIONAL
- ; XBRC-Compute Routine.
- ; XBRP-Print Routine.
- ; XBRX-Exit Routine that cleans variables (HIGHLY SUGGESTED).
- ; XBNS-name space of variables to auto load in
- ; ZTSAVE("NS*")=""
- ; ="DG;AUPN;PS;..." ; (will add '*'if missing).
- ; XBNS("xxx")="" - ZTSAVE variable arrays where xxx is as
- ; described for ZTSAVE("xxxx")="".
- ; XBFQ=1 Force Queing.
- ; XBDTH=FM date time of computing/printing.
- ; XBIOP=pre-selected printer device with constructed with
- ; ION ; IOST ; IOSL ; IOM
- ; (mandatory if the calling routine is a queued routine).
- ; XBPAR= %ZIS("IOPAR") values for host file with XBIOP if
- ; needed.
- ;
- TEST ;
- ; TESTING CODE the following are KISS (keep it supper simple) test
- ; of double queing code including nesting.
- Q
- ;--------------------------------------------------------------------
- TEST1 ; test of stacking a second call to XBDBQUE in the printing routine.
- S SD=1,DG=2
- S XBNS="SD;DG;AG;"
- S XBRP="PA^XBDBQDOC"
- D ^XBDBQUE
- KILL DG,JKL,SD
- Q
- PA ;
- W !,"GOT HERE ON ONE",!
- X "ZW"
- S IOP=XB("IOP"),XBRP="PB^XBDBQDOC",XBNS("JKL")=""
- F I=1:1:10 S JKL(I)=I
- S XBIOP=XB("IOP")
- D ^XBDBQUE
- Q
- PB ;
- W !,"GOT HERE ON TWO",!
- X "ZW"
- Q
- TEST2 ; TEST FOR COMPUTING ONLY
- D DT^DICRW
- S XBRC="RC^XBDBQDOC"
- F XBI=1:1:20 KILL ^XBDBT(XBI)
- W !,"CREATES ^XBDBT(",!
- D ^XBDBQUE
- Q
- RC S %H=$H D YX^%DTC F XBI=1:1:20 S ^PWDBT(XBI)=XBI_Y
- Q
- XBDBQDOC ; IHS/ADC/GTH - DOUBLE QUEUING SHELL HANDLER DOCUMENTATION ; [ 02/07/97 3:02 PM ]
- +1 ;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
- +2 ;
- +3 ;----------------------
- +4 ;NOTES FOR PROGRAMMERS|
- +5 ;----------------------
- +6 ;
- +7 ; %ZIS with "PQM" is called by XBDBQUE if '$D(XBIOP).
- +8 ;
- +9 ; The user will be asked to queue if queuing has not been
- +10 ; selected.
- +11 ;
- +12 ; IO variables as necessary are automatically stored.
- +13 ;
- +14 ; XBxx variables are killed after loading into an XB array.
- +15 ;
- +16 ; XBDBQUE can be nested.
- +17 ;
- +18 ; The compute and print phases can call XBDBQUE individually
- +19 ; (XBIOP is required).
- +20 ;
- +21 ; The appropriate %ZTSK node is killed.
- +22 ;
- +23 ;EX:
- +24 ; S XBRC="C^AGTEST",XBRP="P^AGTEST",XBRX="END^AGTEST",XBNS="AG"
- +25 ; D ^XBDBQUE ;handles foreground and tasking
- +26 ; Q
- +27 ;
- +28 ; VARIABLES NEEDED FROM CALLING PROGRAM
- +29 ;
- +30 ;MANDATORY
- +31 ; EITHER XBRC-Compute Routine or XBRP-Print Routine.
- +32 ;
- +33 ;OPTIONAL
- +34 ; XBRC-Compute Routine.
- +35 ; XBRP-Print Routine.
- +36 ; XBRX-Exit Routine that cleans variables (HIGHLY SUGGESTED).
- +37 ; XBNS-name space of variables to auto load in
- +38 ; ZTSAVE("NS*")=""
- +39 ; ="DG;AUPN;PS;..." ; (will add '*'if missing).
- +40 ; XBNS("xxx")="" - ZTSAVE variable arrays where xxx is as
- +41 ; described for ZTSAVE("xxxx")="".
- +42 ; XBFQ=1 Force Queing.
- +43 ; XBDTH=FM date time of computing/printing.
- +44 ; XBIOP=pre-selected printer device with constructed with
- +45 ; ION ; IOST ; IOSL ; IOM
- +46 ; (mandatory if the calling routine is a queued routine).
- +47 ; XBPAR= %ZIS("IOPAR") values for host file with XBIOP if
- +48 ; needed.
- +49 ;
- TEST ;
- +1 ; TESTING CODE the following are KISS (keep it supper simple) test
- +2 ; of double queing code including nesting.
- +3 QUIT
- +4 ;--------------------------------------------------------------------
- TEST1 ; test of stacking a second call to XBDBQUE in the printing routine.
- +1 SET SD=1
- SET DG=2
- +2 SET XBNS="SD;DG;AG;"
- +3 SET XBRP="PA^XBDBQDOC"
- +4 DO ^XBDBQUE
- +5 KILL DG,JKL,SD
- +6 QUIT
- PA ;
- +1 WRITE !,"GOT HERE ON ONE",!
- +2 XECUTE "ZW"
- +3 SET IOP=XB("IOP")
- SET XBRP="PB^XBDBQDOC"
- SET XBNS("JKL")=""
- +4 FOR I=1:1:10
- SET JKL(I)=I
- +5 SET XBIOP=XB("IOP")
- +6 DO ^XBDBQUE
- +7 QUIT
- PB ;
- +1 WRITE !,"GOT HERE ON TWO",!
- +2 XECUTE "ZW"
- +3 QUIT
- TEST2 ; TEST FOR COMPUTING ONLY
- +1 DO DT^DICRW
- +2 SET XBRC="RC^XBDBQDOC"
- +3 FOR XBI=1:1:20
- KILL ^XBDBT(XBI)
- +4 WRITE !,"CREATES ^XBDBT(",!
- +5 DO ^XBDBQUE
- +6 QUIT
- RC SET %H=$HOROLOG
- DO YX^%DTC
- FOR XBI=1:1:20
- SET ^PWDBT(XBI)=XBI_Y
- +1 QUIT