|
|
Reference Type: Supported, Category: TaskMan, Integration Agreement: 1519
(Added with Kernel Patch XU*8.0*275.) This extrinsic function encapsulates the logic to handle direct (forced) queuing in a single call and does not ask users for a device.
$$DEV^XUTMDEVQ(ztrtn[,ztdesc][,%var][,%voth][,%zis][,iop] [,%wr])
| ztrtn: |
(required) The API that TaskMan will DO to start the task. You can specify it as "LABEL^ROUTINE" or "^ROUTINE" or "ROUTINE". |
| ztdesc: |
(optional) Task description, up to 200 characters describing the task, with the software application name at the front. Default to name of [tag]^routine. |
| %var: |
(optional) ZTSAVE values for the task. Single value or passed by reference, this will be used to S ZTSAVE(). It can be a string of variable names separated by ";". Each ;-piece will be used as a subscript in ZTSAVE. |
| .%voth: |
(optional) Passed by reference, %voth(sub)="" or explicit value sub—this is any other %ZTLOAD variable besides ZTRTN, ZTDESC, ZTIO, ZTSAVE. For example: %VOTH("ZTDTH")==$H
|
| %zis: |
(optional) Default value "MQ". Passed by reference, standard %zis variable array for calling the Device Handler. |
| iop: |
(optional) The IOP variable as defined in Kernel's Device Handler. |
| %wr: |
(optional) If %WR>0 then write text to the screen as to whether or not the queueing was successful. |
| returns: |
Returns:
|
|
This example is a job that consists of gathering information and then
printing it. Assume that the gathering takes a few hours. We do not
want the device that the user selects to be tied up for that time, so we
divide the job into two tasks. The first task gathers the information, and
the second task prints it. We use the $$DEV^XUTMDEVQ API to select the device and
queue up the print task, and the
$$NODEV^XUTMDEVQ
API
to schedule the gather task. We use
the
REQ^%ZTLOAD
API
to schedule the print task when the gather task finishes.
NOTE: You could also use the
$$REQQ^XUTMDEVQ
API to schedule the print task.
ARHBQQ ;SFVAMC/GB - Demo of 'gather' and 'print' in 2 tasks ;1/19/06 08:31
;;1.1
DEV ;
N ARH,ARHZTSK,X
;The user doesn't know it, but he's actually queuing the second task,
;the "print" portion of the job. The only question the user will be
;asked is to select the device.
S ARH("ZTDTH")="@" ;Don't schedule the task to run, we'll do it later.
;In the following, the "Q" sets IOP=Q, which forces queueing.
S X=$$DEV^XUTMDEVQ("PRINT^ARHBQQ","ARHB Print",,.ARH,,"Q",1)
W !,"X=",X
Q:X<1
N ARH
;Now queue the first task, the "gather" portion of the job. The user
;won't be asked any questions.
S ARHZTSK=X ; Save the ZTSK number of the "print" task.
S ARH("ZTDTH")=$H ; Force the task to start now.
;To ask the user the start time, comment out the above line.
S X=$$NODEV^XUTMDEVQ("GATHER^ARHBQQ","ARHB Gather","ARHZTSK",.ARH,1)
W !,"X=",X
Q
|
VA (Internet) / VA (Intranet) / OI / HSD&D / Site Map / Terms of Use / VA Privacy Policy / Accessibility Reviewed/Updated:
January 31, 2006
|