Kernel 8.0 APIs Banner [skip navigation]
Office of Information & Technology (OIT) Banner

$$REQQ^XUTMDEVQ(): Schedule Second Part of a Task

Reference Type: Supported, Category: TaskMan, Integration Agreement: 1519


(Added with Kernel Patch XU*8.0*389.) This extrinsic function schedules the second task (i.e., print data) from the $$QQ^XUTMDEVQ API.

If it will take a long time to gather and print data, users should split the job into two tasks:

  1. Gather Data—The first task gathers the data.

  2. Print Data—The second task prints the data.

Separating the data-gathering task from the data print task helps avoid unnecessarily tying up a printer while large amounts of data are gathered.

This API makes sure that only the scheduled time and any variables in %VAR are passed to the REQ^%ZTLOAD API.



Input Parameters


(required) This input parameter is the TaskMan task to schedule the second task from $$QQ^XUTMDEVQ API and should be in the XUTMQQ variable.


(required) This input parameter is the new scheduled run time.


(optional) This input parameter is converted to the ZTSAVE variable; it is the same as the %var input parameter for the $$DEV^XUTMDEVQ API.




  • 1—Successful.

  • 0—Unsuccessful.


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 $$QQ^XUTMDEVQ to select the device, schedule the gather task, and queue the print task. We use the $$REQQ^XUTMDEVQ API to schedule the print task when the gather task finishes.

NOTE: This is the easiest way to divide a job into two tasks.

ARHBQQ   ;SFVAMC/GB - Demo of 'gather' and 'print' in 2 tasks ;1/19/06  08:31
QQ       ;
         N X
         W !,"X=",X
         N ARHJ,X
         S ZTREQ="@"
         S ARHJ="ARHB-QQ"_"-"_$J_"-"_$H ; namespace + unique ID
         K ^XTMP(ARHJ) ; Use ^XTMP to pass a lot of data between tasks.
         S ^XTMP(ARHJ,0)=$$FMADD^XLFDT(DT,1)_U_DT ; Save-thru and create dates.
         S ^XTMP(ARHJ)="HI MOM!" ; Pretend this is a lot of data!
         ; XUTMQQ holds the ZTSK of the print task
         S X=$$REQQ^XUTMDEVQ(XUTMQQ,$H,"ARHJ") ; Schedule print task to start
         S ZTREQ="@"
         ;U IO ; Don't need this if invoked using a ^XUTMDEVQ API.
         W !,"The secret message is: '",$G(^XTMP(ARHJ)),"'"
         K ^XTMP(ARHJ)


VA (Internet) / VA(Intranet) / OI / PD / Site Map / Terms of Use / VA Privacy Policy / Accessibility

Reviewed/Updated: August 26, 2011

If you have questions, need more information, or are having accessibility problems with this website, please contact us by E-Mail: Webmasters, Phone: 510-768-6800, or FAX: 510-768-6850.