TIUP290A ;ISP/JLC - POST FOR PATCH TIU*1.0*290 ;Apr 24, 2020@13:48
;;1.0;TEXT INTEGRATION UTILITIES;**290**;Jun 20, 1997;Build 548
Q
EN ; Task off the Build of the Copy/Paste indices for file #8925
N ZTDTH,ZTIO,ZTSK,ZTRTN,ZTDESC
S ZTDTH=$$FMADD^XLFDT($$NOW^XLFDT,0,0,0,10)
S ZTRTN="TASK^TIUP290A",ZTDESC="Build of Copy/Paste indices for files #8925 and #8925.95"
S ZTIO=""
D ^%ZTLOAD
I +$G(ZTSK)=0 D
. D BMES^XPDUTL("Unable to queue the Copy/Paste indices build, file a help desk ticket for assistance.")
E D
. D BMES^XPDUTL("DONE - Task #"_ZTSK)
Q
TASK ;
N TIUIEN,I,J,STOP,A,TIU12,TIU13,TIUDOC
S STOP=0
K ^TIU(8925.95,"AC") ; Clean-up index due to falty cross-reference setup
K DA,DIK,DIC
S TIUDOC=""
F S TIUDOC=$O(^TIU(8925.95,TIUDOC)) Q:TIUDOC="" D
. I $P($G(^TIU(8925.95,TIUDOC,10)),U,1)'=1 Q
. S DA=TIUDOC,DIK="^TIU(8925.95,",DIK(1)="10.1^AC"
. D EN^DIK
S TIUIEN=$G(^TIU(8925,"AADT",0)) I TIUIEN="" S TIUIEN=" "
F I=1:1 D Q:'TIUIEN I STOP Q
. S TIUIEN=$O(^TIU(8925,TIUIEN),-1) Q:'TIUIEN
. S TIU12=$G(^TIU(8925,TIUIEN,12))
. S TIU13=$G(^TIU(8925,TIUIEN,13))
. S X(1)=$P(TIU12,"^",2),X(2)=$P(TIU13,"^",2),X(3)=$P(TIU13,"^")
. S DA=TIUIEN
. D KAADT^TIUDD01(.X)
. D SAADT^TIUDD0(.X)
. K DA,DIK,DIC
. S DA=TIUIEN,DIK="^TIU(8925,",DIK(1)="1301^H"
. D EN^DIK
. S ^TIU(8925,"AADT",0)=TIUIEN
. I '(I#100000) D I STOP Q
.. F J=1:1:300 H 1 I '(J#60) S STOP=$$REQ2STOP() I STOP Q
. I '(I#500) S STOP=$$REQ2STOP() I STOP Q
I STOP Q
K ^TIU(8925,"AADT",0)
D MSG
Q
MSG ;
N XMSUB,XMY,XMTEXT,XMDUZ,TIUTEXT,SITE,I,A
S TIUTEXT(1)="Build of Copy/Paste indicess completed for "_$$SITE^VASITE()
S TIUTEXT(2)=" "
S XMDUZ=DUZ
S XMSUB="Build of Copy/Paste indicess completed"
S XMY("CRUMLEY.JAMIE@DOMAIN.EXT")="",XMY("HAWSEY.JASON@DOMAIN.EXT")=""
S XMTEXT="TIUTEXT("
D ^XMD
Q
REQ2STOP() ;
; Check for task stop request
; Returns 1 if stop request made.
N STATUS,X
S STATUS=0
I '$D(ZTQUEUED) Q 0
S X=$$S^%ZTLOAD()
I X D ;
. S STATUS=1
. S X=$$S^%ZTLOAD("Received shutdown request")
;
Q STATUS
TEMPLATE ;post-install to check line length in templates
N ZTRTN,ZTDESC,ZTDTH,ZTIO,ZTSK
D BMES^XPDUTL(" Queueing the template checker task...")
S ZTRTN="CHECK^TIUP290A",ZTDESC="TIU*1*290 TEMPLATE CHECKER"
S ZTDTH=$$FMADD^XLFDT($$NOW^XLFDT,0,0,2),ZTIO=""
D ^%ZTLOAD
I +$G(ZTSK)>0 D MES^XPDUTL(" Successfully queued the task with task #"_ZTSK)
I '+$G(ZTSK) D MES^XPDUTL(" Failed to queue the task"),CHECK
Q
CHECK ;check the length of template text
N ROOTIEN,LINE,NEXTSTOP,ROOT,OUTPUTHEADER,HEADER,PATH,OUTPUTPATH
S LINE=0
F ROOT="CONSULTS","PROCEDURES" D
.S ROOTIEN=+$O(^TIU(8927,"AROOT",ROOT,"")) Q:ROOTIEN=0
.S OUTPUTHEADER=1,OUTPUTPATH=0,PATH=""
.S HEADER=$P($G(^TIU(8927,ROOTIEN,0)),U,1) I HEADER="" S HEADER=ROOT
.D CHILDREN(ROOTIEN,.NEXTSTOP,.ZTSTOP,.LINE,.OUTPUTHEADER,HEADER,.PATH,.OUTPUTPATH)
K:+$G(ZTSTOP)=0 ZTSTOP
I +$G(ZTSTOP)=1 D
.S LINE=1,^TMP("TIU MSG",$J,LINE,0)="Task #"_$G(ZTSK)_" was stopped before it finished."
.S LINE=LINE+1,^TMP("TIU MSG",$J,LINE,0)="Restart the task or execute D TEMPLATE^TIUP290A from the Programmer's"
.S LINE=LINE+1,^TMP("TIU MSG",$J,LINE,0)="prompt to restart the template checker."
I '+$G(LINE) D
.K ^TMP("TIU MSG",$J)
.S LINE=1,^TMP("TIU MSG",$J,LINE,0)="There are no templates containing text that is more than 74 characters in"
.S LINE=LINE+1,^TMP("TIU MSG",$J,LINE,0)="length."
N XMMG,XMDUZ,XMZ,XMERR,DIFROM,XMTEXT,XMSUB,XMY
S XMDUZ="TIU TEMPLATE CHECKER",XMSUB="TIU*1*290 TEMPLATE CHECK RESULTS"
S XMTEXT="^TMP(""TIU MSG"",$J,"
S XMY(DUZ)="",XMY("G.OR CACS")=""
D ^XMD
I $D(XMMG)>0 D
.M ^XTMP("TIU*1*290 TEMPLATE CHECK RESULTS")=^TMP("GMRA MSG",$J)
.S ^XTMP("TIU*1*290 TEMPLATE CHECK RESULTS",0)=$$FMADD^XLFDT(DT,31)_U_DT_U_"PATCH TIU*1*290 TEMPLATE CHECK RESULTS"
K ^TMP("TIU MSG",$J)
I $D(ZTQUEUED),'$D(ZTSTOP) S ZTREQ="@"
I '$D(ZTQUEUED) D MES^XPDUTL(" Template checker process has exited")
Q
CHILDREN(ROOTIEN,NEXTSTOP,ZTSTOP,LINE,OUTPUTHEADER,HEADER,PATH,OUTPUTPATH) ;recursively search templates
N ITEMIEN,IEN,NAME,G74,START,CNT,NODE
S ITEMIEN=0 F S ITEMIEN=$O(^TIU(8927,ROOTIEN,10,ITEMIEN)) Q:('+ITEMIEN)!($G(ZTSTOP)) D
.I $G(NEXTSTOP)=""!($G(NEXTSTOP)=$H) D
..S ZTSTOP=$$S^%ZTLOAD Q:ZTSTOP
..S NEXTSTOP=$$HADD^XLFDT($H,0,0,0,30)
.Q:ZTSTOP
.S IEN=+$P($G(^TIU(8927,ROOTIEN,10,ITEMIEN,0)),U,2) Q:'IEN
.S NODE=$G(^TIU(8927,IEN,0))
.S NAME=$P(NODE,U,1) Q:NAME=""
.I $P(NODE,U,3)="C" S PATH=$S($G(PATH)'="":PATH_" > ",1:"")_NAME,OUTPUTPATH=1
.S G74=0,START=0
.S CNT=0 F S CNT=$O(^TIU(8927,IEN,2,CNT)) Q:(CNT'>0)!(G74=1) D
..S NODE=$G(^TIU(8927,IEN,2,CNT,0))
..D STRIPFIELDS(.NODE,.START)
..I $L(NODE)>74 S G74=1
.I G74 D ADDTEMPLATE(.LINE,.OUTPUTPATH,.PATH,NAME,.OUTPUTHEADER,HEADER)
.I $D(^TIU(8927,IEN,10))>9 D CHILDREN(IEN,.NEXTSTOP,.ZTSTOP,.LINE,.OUTPUTHEADER,HEADER,.PATH,.OUTPUTPATH)
Q
STRIPFIELDS(TEXT,START) ;remove template field(s) from text
N INDEX,THIS,SPEC,SEARCH
S THIS=0
F INDEX=1:1 Q:INDEX>$L(TEXT) D
.I ($E(TEXT,INDEX,INDEX+4)="{FLD:")!(($E(TEXT,INDEX)="|")&(START=0)) S START=START+1,START(START)=INDEX,THIS=1 Q
.I (($E(TEXT,INDEX)="}")!($E(TEXT,INDEX)="|"))&(+$G(START)>0) D
..S SEARCH=$E(TEXT,$S(THIS=1:START(START),1:1),INDEX),SPEC(SEARCH)=""
..S TEXT=$$REPLACE^XLFSTR(TEXT,.SPEC),INDEX=INDEX-$L(SEARCH)
..K SPEC,START(START)
..S START=START-1
I START>0 D
.I THIS S SPEC($E(TEXT,START(START),$L(TEXT)))="",TEXT=$$REPLACE^XLFSTR(TEXT,.SPEC)
.E S TEXT=""
Q
ADDTEMPLATE(LINE,OUTPUTPATH,PATH,NAME,OUTPUTHEADER,HEADER) ;add a template to the message body
I '+$G(LINE) D
.K ^TMP("TIU MSG",$J)
.S LINE=1,^TMP("TIU MSG",$J,LINE,0)="The following templates contain text that is more than 74 characters in"
.S LINE=LINE+1,^TMP("TIU MSG",$J,LINE,0)="length. Please review each template in CPRS to ensure that the text is"
.S LINE=LINE+1,^TMP("TIU MSG",$J,LINE,0)="wrapped correctly."
.S LINE=LINE+1,^TMP("TIU MSG",$J,LINE,0)=""
I OUTPUTHEADER D
.I LINE>3 S LINE=LINE+1,^TMP("TIU MSG",$J,LINE,0)=""
.S LINE=LINE+1,^TMP("TIU MSG",$J,LINE,0)=HEADER
.S LINE=LINE+1,^TMP("TIU MSG",$J,LINE,0)=$$REPEAT^XLFSTR("-",$L(HEADER))
.S OUTPUTHEADER=0
I OUTPUTPATH S LINE=LINE+1,^TMP("TIU MSG",$J,LINE,0)=PATH,OUTPUTPATH=0
I PATH'="" S NAME=" "_NAME
S LINE=LINE+1,^TMP("TIU MSG",$J,LINE,0)=NAME
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HTIUP290A 6434 printed Oct 16, 2024@18:43:33 Page 2
TIUP290A ;ISP/JLC - POST FOR PATCH TIU*1.0*290 ;Apr 24, 2020@13:48
+1 ;;1.0;TEXT INTEGRATION UTILITIES;**290**;Jun 20, 1997;Build 548
+2 QUIT
EN ; Task off the Build of the Copy/Paste indices for file #8925
+1 NEW ZTDTH,ZTIO,ZTSK,ZTRTN,ZTDESC
+2 SET ZTDTH=$$FMADD^XLFDT($$NOW^XLFDT,0,0,0,10)
+3 SET ZTRTN="TASK^TIUP290A"
SET ZTDESC="Build of Copy/Paste indices for files #8925 and #8925.95"
+4 SET ZTIO=""
+5 DO ^%ZTLOAD
+6 IF +$GET(ZTSK)=0
Begin DoDot:1
+7 DO BMES^XPDUTL("Unable to queue the Copy/Paste indices build, file a help desk ticket for assistance.")
End DoDot:1
+8 IF '$TEST
Begin DoDot:1
+9 DO BMES^XPDUTL("DONE - Task #"_ZTSK)
End DoDot:1
+10 QUIT
TASK ;
+1 NEW TIUIEN,I,J,STOP,A,TIU12,TIU13,TIUDOC
+2 SET STOP=0
+3 ; Clean-up index due to falty cross-reference setup
KILL ^TIU(8925.95,"AC")
+4 KILL DA,DIK,DIC
+5 SET TIUDOC=""
+6 FOR
SET TIUDOC=$ORDER(^TIU(8925.95,TIUDOC))
if TIUDOC=""
QUIT
Begin DoDot:1
+7 IF $PIECE($GET(^TIU(8925.95,TIUDOC,10)),U,1)'=1
QUIT
+8 SET DA=TIUDOC
SET DIK="^TIU(8925.95,"
SET DIK(1)="10.1^AC"
+9 DO EN^DIK
End DoDot:1
+10 SET TIUIEN=$GET(^TIU(8925,"AADT",0))
IF TIUIEN=""
SET TIUIEN=" "
+11 FOR I=1:1
Begin DoDot:1
+12 SET TIUIEN=$ORDER(^TIU(8925,TIUIEN),-1)
if 'TIUIEN
QUIT
+13 SET TIU12=$GET(^TIU(8925,TIUIEN,12))
+14 SET TIU13=$GET(^TIU(8925,TIUIEN,13))
+15 SET X(1)=$PIECE(TIU12,"^",2)
SET X(2)=$PIECE(TIU13,"^",2)
SET X(3)=$PIECE(TIU13,"^")
+16 SET DA=TIUIEN
+17 DO KAADT^TIUDD01(.X)
+18 DO SAADT^TIUDD0(.X)
+19 KILL DA,DIK,DIC
+20 SET DA=TIUIEN
SET DIK="^TIU(8925,"
SET DIK(1)="1301^H"
+21 DO EN^DIK
+22 SET ^TIU(8925,"AADT",0)=TIUIEN
+23 IF '(I#100000)
Begin DoDot:2
+24 FOR J=1:1:300
HANG 1
IF '(J#60)
SET STOP=$$REQ2STOP()
IF STOP
QUIT
End DoDot:2
IF STOP
QUIT
+25 IF '(I#500)
SET STOP=$$REQ2STOP()
IF STOP
QUIT
End DoDot:1
if 'TIUIEN
QUIT
IF STOP
QUIT
+26 IF STOP
QUIT
+27 KILL ^TIU(8925,"AADT",0)
+28 DO MSG
+29 QUIT
MSG ;
+1 NEW XMSUB,XMY,XMTEXT,XMDUZ,TIUTEXT,SITE,I,A
+2 SET TIUTEXT(1)="Build of Copy/Paste indicess completed for "_$$SITE^VASITE()
+3 SET TIUTEXT(2)=" "
+4 SET XMDUZ=DUZ
+5 SET XMSUB="Build of Copy/Paste indicess completed"
+6 SET XMY("CRUMLEY.JAMIE@DOMAIN.EXT")=""
SET XMY("HAWSEY.JASON@DOMAIN.EXT")=""
+7 SET XMTEXT="TIUTEXT("
+8 DO ^XMD
+9 QUIT
REQ2STOP() ;
+1 ; Check for task stop request
+2 ; Returns 1 if stop request made.
+3 NEW STATUS,X
+4 SET STATUS=0
+5 IF '$DATA(ZTQUEUED)
QUIT 0
+6 SET X=$$S^%ZTLOAD()
+7 ;
IF X
Begin DoDot:1
+8 SET STATUS=1
+9 SET X=$$S^%ZTLOAD("Received shutdown request")
End DoDot:1
+10 ;
+11 QUIT STATUS
TEMPLATE ;post-install to check line length in templates
+1 NEW ZTRTN,ZTDESC,ZTDTH,ZTIO,ZTSK
+2 DO BMES^XPDUTL(" Queueing the template checker task...")
+3 SET ZTRTN="CHECK^TIUP290A"
SET ZTDESC="TIU*1*290 TEMPLATE CHECKER"
+4 SET ZTDTH=$$FMADD^XLFDT($$NOW^XLFDT,0,0,2)
SET ZTIO=""
+5 DO ^%ZTLOAD
+6 IF +$GET(ZTSK)>0
DO MES^XPDUTL(" Successfully queued the task with task #"_ZTSK)
+7 IF '+$GET(ZTSK)
DO MES^XPDUTL(" Failed to queue the task")
DO CHECK
+8 QUIT
CHECK ;check the length of template text
+1 NEW ROOTIEN,LINE,NEXTSTOP,ROOT,OUTPUTHEADER,HEADER,PATH,OUTPUTPATH
+2 SET LINE=0
+3 FOR ROOT="CONSULTS","PROCEDURES"
Begin DoDot:1
+4 SET ROOTIEN=+$ORDER(^TIU(8927,"AROOT",ROOT,""))
if ROOTIEN=0
QUIT
+5 SET OUTPUTHEADER=1
SET OUTPUTPATH=0
SET PATH=""
+6 SET HEADER=$PIECE($GET(^TIU(8927,ROOTIEN,0)),U,1)
IF HEADER=""
SET HEADER=ROOT
+7 DO CHILDREN(ROOTIEN,.NEXTSTOP,.ZTSTOP,.LINE,.OUTPUTHEADER,HEADER,.PATH,.OUTPUTPATH)
End DoDot:1
+8 if +$GET(ZTSTOP)=0
KILL ZTSTOP
+9 IF +$GET(ZTSTOP)=1
Begin DoDot:1
+10 SET LINE=1
SET ^TMP("TIU MSG",$JOB,LINE,0)="Task #"_$GET(ZTSK)_" was stopped before it finished."
+11 SET LINE=LINE+1
SET ^TMP("TIU MSG",$JOB,LINE,0)="Restart the task or execute D TEMPLATE^TIUP290A from the Programmer's"
+12 SET LINE=LINE+1
SET ^TMP("TIU MSG",$JOB,LINE,0)="prompt to restart the template checker."
End DoDot:1
+13 IF '+$GET(LINE)
Begin DoDot:1
+14 KILL ^TMP("TIU MSG",$JOB)
+15 SET LINE=1
SET ^TMP("TIU MSG",$JOB,LINE,0)="There are no templates containing text that is more than 74 characters in"
+16 SET LINE=LINE+1
SET ^TMP("TIU MSG",$JOB,LINE,0)="length."
End DoDot:1
+17 NEW XMMG,XMDUZ,XMZ,XMERR,DIFROM,XMTEXT,XMSUB,XMY
+18 SET XMDUZ="TIU TEMPLATE CHECKER"
SET XMSUB="TIU*1*290 TEMPLATE CHECK RESULTS"
+19 SET XMTEXT="^TMP(""TIU MSG"",$J,"
+20 SET XMY(DUZ)=""
SET XMY("G.OR CACS")=""
+21 DO ^XMD
+22 IF $DATA(XMMG)>0
Begin DoDot:1
+23 MERGE ^XTMP("TIU*1*290 TEMPLATE CHECK RESULTS")=^TMP("GMRA MSG",$JOB)
+24 SET ^XTMP("TIU*1*290 TEMPLATE CHECK RESULTS",0)=$$FMADD^XLFDT(DT,31)_U_DT_U_"PATCH TIU*1*290 TEMPLATE CHECK RESULTS"
End DoDot:1
+25 KILL ^TMP("TIU MSG",$JOB)
+26 IF $DATA(ZTQUEUED)
IF '$DATA(ZTSTOP)
SET ZTREQ="@"
+27 IF '$DATA(ZTQUEUED)
DO MES^XPDUTL(" Template checker process has exited")
+28 QUIT
CHILDREN(ROOTIEN,NEXTSTOP,ZTSTOP,LINE,OUTPUTHEADER,HEADER,PATH,OUTPUTPATH) ;recursively search templates
+1 NEW ITEMIEN,IEN,NAME,G74,START,CNT,NODE
+2 SET ITEMIEN=0
FOR
SET ITEMIEN=$ORDER(^TIU(8927,ROOTIEN,10,ITEMIEN))
if ('+ITEMIEN)!($GET(ZTSTOP))
QUIT
Begin DoDot:1
+3 IF $GET(NEXTSTOP)=""!($GET(NEXTSTOP)=$HOROLOG)
Begin DoDot:2
+4 SET ZTSTOP=$$S^%ZTLOAD
if ZTSTOP
QUIT
+5 SET NEXTSTOP=$$HADD^XLFDT($HOROLOG,0,0,0,30)
End DoDot:2
+6 if ZTSTOP
QUIT
+7 SET IEN=+$PIECE($GET(^TIU(8927,ROOTIEN,10,ITEMIEN,0)),U,2)
if 'IEN
QUIT
+8 SET NODE=$GET(^TIU(8927,IEN,0))
+9 SET NAME=$PIECE(NODE,U,1)
if NAME=""
QUIT
+10 IF $PIECE(NODE,U,3)="C"
SET PATH=$SELECT($GET(PATH)'="":PATH_" > ",1:"")_NAME
SET OUTPUTPATH=1
+11 SET G74=0
SET START=0
+12 SET CNT=0
FOR
SET CNT=$ORDER(^TIU(8927,IEN,2,CNT))
if (CNT'>0)!(G74=1)
QUIT
Begin DoDot:2
+13 SET NODE=$GET(^TIU(8927,IEN,2,CNT,0))
+14 DO STRIPFIELDS(.NODE,.START)
+15 IF $LENGTH(NODE)>74
SET G74=1
End DoDot:2
+16 IF G74
DO ADDTEMPLATE(.LINE,.OUTPUTPATH,.PATH,NAME,.OUTPUTHEADER,HEADER)
+17 IF $DATA(^TIU(8927,IEN,10))>9
DO CHILDREN(IEN,.NEXTSTOP,.ZTSTOP,.LINE,.OUTPUTHEADER,HEADER,.PATH,.OUTPUTPATH)
End DoDot:1
+18 QUIT
STRIPFIELDS(TEXT,START) ;remove template field(s) from text
+1 NEW INDEX,THIS,SPEC,SEARCH
+2 SET THIS=0
+3 FOR INDEX=1:1
if INDEX>$LENGTH(TEXT)
QUIT
Begin DoDot:1
+4 IF ($EXTRACT(TEXT,INDEX,INDEX+4)="{FLD:")!(($EXTRACT(TEXT,INDEX)="|")&(START=0))
SET START=START+1
SET START(START)=INDEX
SET THIS=1
QUIT
+5 IF (($EXTRACT(TEXT,INDEX)="}")!($EXTRACT(TEXT,INDEX)="|"))&(+$GET(START)>0)
Begin DoDot:2
+6 SET SEARCH=$EXTRACT(TEXT,$SELECT(THIS=1:START(START),1:1),INDEX)
SET SPEC(SEARCH)=""
+7 SET TEXT=$$REPLACE^XLFSTR(TEXT,.SPEC)
SET INDEX=INDEX-$LENGTH(SEARCH)
+8 KILL SPEC,START(START)
+9 SET START=START-1
End DoDot:2
End DoDot:1
+10 IF START>0
Begin DoDot:1
+11 IF THIS
SET SPEC($EXTRACT(TEXT,START(START),$LENGTH(TEXT)))=""
SET TEXT=$$REPLACE^XLFSTR(TEXT,.SPEC)
+12 IF '$TEST
SET TEXT=""
End DoDot:1
+13 QUIT
ADDTEMPLATE(LINE,OUTPUTPATH,PATH,NAME,OUTPUTHEADER,HEADER) ;add a template to the message body
+1 IF '+$GET(LINE)
Begin DoDot:1
+2 KILL ^TMP("TIU MSG",$JOB)
+3 SET LINE=1
SET ^TMP("TIU MSG",$JOB,LINE,0)="The following templates contain text that is more than 74 characters in"
+4 SET LINE=LINE+1
SET ^TMP("TIU MSG",$JOB,LINE,0)="length. Please review each template in CPRS to ensure that the text is"
+5 SET LINE=LINE+1
SET ^TMP("TIU MSG",$JOB,LINE,0)="wrapped correctly."
+6 SET LINE=LINE+1
SET ^TMP("TIU MSG",$JOB,LINE,0)=""
End DoDot:1
+7 IF OUTPUTHEADER
Begin DoDot:1
+8 IF LINE>3
SET LINE=LINE+1
SET ^TMP("TIU MSG",$JOB,LINE,0)=""
+9 SET LINE=LINE+1
SET ^TMP("TIU MSG",$JOB,LINE,0)=HEADER
+10 SET LINE=LINE+1
SET ^TMP("TIU MSG",$JOB,LINE,0)=$$REPEAT^XLFSTR("-",$LENGTH(HEADER))
+11 SET OUTPUTHEADER=0
End DoDot:1
+12 IF OUTPUTPATH
SET LINE=LINE+1
SET ^TMP("TIU MSG",$JOB,LINE,0)=PATH
SET OUTPUTPATH=0
+13 IF PATH'=""
SET NAME=" "_NAME
+14 SET LINE=LINE+1
SET ^TMP("TIU MSG",$JOB,LINE,0)=NAME
+15 QUIT