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

EN^XUTMDEVQ(): Run a Task (Directly or Queued)

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


This API encapsulates the logic to handle both direct printing and queuing in a single call.

EN^XUTMDEVQ calls ^%ZIS to query the user for device selection. The user can choose a device on which to run the job directly or choose to queue the job.

After calling ^%ZIS, EN^XUTMDEVQ looks to see if the queuing was chosen. If so, EN^XUTMDEVQ uses the values from the ztrtn, ztdesc, and ztsave input parameters to queue the job to the chosen device. If the user did not choose to queue, EN^XUTMDEVQ runs the job directly using the ztrtn input parameter. Thus, EN^XUTMDEVQ provides a simple way to facilitate both queuing and running a job directly.

If the IOP variable is defined before calling EN^XUTMDEVQ, it will have the same effect as it does if defined before a ^%ZIS call.

If the ZTPRI or ZTKIL variables are defined before calling EN^XUTMDEVQ, they will have the same effect as they do if defined before an ^%ZTLOAD call. Other ^%ZTLOAD input variables have no effect, however.

You do not need to "USE IO" in the routine specified in the ztrtn input parameter; IO will be the current device, whether the job is queued or run directly. Also, you do not need to pass "Q" in the top level of the %ZIS input array; if the top level of the array does not contain "Q", "Q" will be appended to it (to allow queuing).



Input Parameters


(required) The API that TaskMan will DO to start the task. You can specify it as "LABEL^ROUTINE" or "^ROUTINE" or "ROUTINE".


(required) Task description, up to two hundred characters describing the task, with the software application name at the front.


(required) Pass by reference. Set up this array in the same format as the ztsave input array is set up for the ^%ZTLOAD TaskMan API. The array you set up in ztsave is passed directly as ztsave to TaskMan if the user chooses to queue the job.


(optional) Pass by reference. String containing input specifications for the Device Handler. Set up the array in the same way as the %ZIS array is set up for the ^%ZIS Standard Device Call API. The array you set up in the %ZIS input parameter is passed directly as %ZIS to the Device Handler.

All %ZIS subscripts from the regular ^%ZIS call ("A", "B", "HFSMODE", etc.) can be passed in the %ZIS input array.


(optional) This is the return task number (i.e.,  ztsk). Put a number in this parameter, such that $G(retztsk), then ztsk will exist as an output variable. Otherwise, ztsk will not exist as an output variable.

Output Parameter


If a number is entered in the retztsk input parameter, the task number assigned to a task is returned.


Sample report:

ZZYZOPT     ;ISC-SF/doc 
EN   ;
     N ZZEN K X,DIC S DIC=9.6,DIC(0)="AEMO" D ^DIC
     Q:+Y'>0  S ZZEN=+Y
P    ;
     ; code for printout
     W !,"Here goes the body of the report!"
     W !,"ZZEN = ",ZZEN


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.