RGUTTSK ;CAIRO/DKM - Encapsulates TaskMan API ;04-Sep-1998 11:26;DKM
;;2.1;RUN TIME LIBRARY;;Mar 22, 1999
;=================================================================
QUEUE(ZTRTN,ZTDESC,ZTDTH,ZTSAVE,ZTIO,ZTUCI,ZTPRI) ;
N %RGZ,%RGZ1,%RGZ2,ZTKIL,ZTSK,ZTCPU
S:'$G(ZTDTH) ZTDTH=$H
S:ZTDTH'?1.N1","1.N ZTDTH=$$FMTH^XLFDT(ZTDTH)
Q:ZTDTH<0 0
S:$G(ZTUCI)'="" ZTUCI=$TR(ZTUCI,":",","),ZTCPU=$P(ZTUCI,",",2),ZTUCI=$P(ZTUCI,",")
S ZTSAVE=$G(ZTSAVE),ZTIO=$G(ZTIO),U="^"
F %RGZ=1:1:$L(ZTSAVE,U) D
.S %RGZ1=$P(ZTSAVE,U,%RGZ),%RGZ2=$P(%RGZ1,"=",2,999),%RGZ1=$P(%RGZ1,"=")
.S:%RGZ1'="" ZTSAVE(%RGZ1)=%RGZ2
D ^%ZTLOAD
Q +$G(ZTSK)
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRGUTTSK 647 printed Dec 13, 2024@02:37:33 Page 2
RGUTTSK ;CAIRO/DKM - Encapsulates TaskMan API ;04-Sep-1998 11:26;DKM
+1 ;;2.1;RUN TIME LIBRARY;;Mar 22, 1999
+2 ;=================================================================
QUEUE(ZTRTN,ZTDESC,ZTDTH,ZTSAVE,ZTIO,ZTUCI,ZTPRI) ;
+1 NEW %RGZ,%RGZ1,%RGZ2,ZTKIL,ZTSK,ZTCPU
+2 if '$GET(ZTDTH)
SET ZTDTH=$HOROLOG
+3 if ZTDTH'?1.N1","1.N
SET ZTDTH=$$FMTH^XLFDT(ZTDTH)
+4 if ZTDTH<0
QUIT 0
+5 if $GET(ZTUCI)'=""
SET ZTUCI=$TRANSLATE(ZTUCI,":",",")
SET ZTCPU=$PIECE(ZTUCI,",",2)
SET ZTUCI=$PIECE(ZTUCI,",")
+6 SET ZTSAVE=$GET(ZTSAVE)
SET ZTIO=$GET(ZTIO)
SET U="^"
+7 FOR %RGZ=1:1:$LENGTH(ZTSAVE,U)
Begin DoDot:1
+8 SET %RGZ1=$PIECE(ZTSAVE,U,%RGZ)
SET %RGZ2=$PIECE(%RGZ1,"=",2,999)
SET %RGZ1=$PIECE(%RGZ1,"=")
+9 if %RGZ1'=""
SET ZTSAVE(%RGZ1)=%RGZ2
End DoDot:1
+10 DO ^%ZTLOAD
+11 QUIT +$GET(ZTSK)