PSNFTP3 ;HP/ART - PPS-N NDF Updates File Transfer ;05/15/2017
;;4.0;NATIONAL DRUG FILE;**513**; 30 Oct 98;Build 53
;
Q
;
VERIFY ; PPS-N installation verification
N NOW,RUN,START,PSNHLD,NODE,JOB,TYPE
D NOW^%DTC S NOW=%,TYPE="I"
S JOB=0 F S JOB=$O(^XTMP("PSN PPS VERIFY",JOB)) Q:'JOB S PSNHLD="" F S PSNHLD=$O(^XTMP("PSN PPS VERIFY",JOB,PSNHLD)) Q:PSNHLD="" S NODE=$G(^XTMP("PSN PPS VERIFY",JOB,PSNHLD,0)) D
. S START=$P(NODE,"^",2),RUN=$$FMDIFF^XLFDT(NOW,START,2) I RUN>3600 D
. . K ^XTMP("PSN PPS VERIFY",JOB,PSNHLD,0)
. . D MSG
Q
;
MSG ; send error message to indicate installation did not complete
N PSGRP,PSDA,PSNTXT,XMSUB,XMTEXT
S XMSUB="ERROR: PPS-N "_$S(TYPE="D":"download",TYPE="I":"install",1:"")_" did not complete"
S PSNFILE=$S($D(PSREMFIL):PSREMFIL,$D(PSNHLD):PSNHLD,1:"")
I $D(DUZ) S XMY(DUZ)=""
S PSDA=0 F S PSDA=$O(^XUSEC("PSNMGR",PSDA)) Q:'PSDA S XMY(PSDA)=""
S PSGRP="",PSGRP=$$GET1^DIQ(57.23,1,5) I PSGRP'="" S XMY($$MG^PSNPPSMG(PSGRP))=""
S PSGRP="",PSGRP=$$GET1^DIQ(57.23,1,6) I PSGRP'="" S XMY($$MG^PSNPPSMG(PSGRP))=""
S PSNTXT(1)="**************************************************************************"
S PSNTXT(2)="*** An error occurred during "_$S(TYPE="D":"download",1:"install")_" of the following Update file(s): ***"
S PSNTXT(3)="**************************************************************************"
S PSNTXT(4)="The following file(s) could not be "_$S(TYPE="D":"downloaded",1:"installed")_":"
S PSNTXT(5)=""
S PSNTXT(6)=" Update file Name"
S PSNTXT(7)=" -------------------"
S PSNTXT(8)=" "_PSNFILE
S PSNTXT(9)=""
S PSNTXT(10)="Error: "_$$EC^%ZOSV
S PSNTXT(11)=""
S PSNTXT(12)="How to correct your error:"
S PSNTXT(13)="1. Rerun the "_$S(TYPE="D":"downloaded",TYPE="I":"installed",1:"")_" option to re-attempt retrieval."
S PSNTXT(14)="2. Contact the National Help Desk or enter a ticket."
S PSNTXT(15)=""
S PSNTXT(16)="Further details can be found on the Download/Install Status Report option."
S XMTEXT="PSNTXT("
D ^XMD K XMSUB,XMY,XMTEXT
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSNFTP3 2082 printed Oct 16, 2024@18:24:48 Page 2
PSNFTP3 ;HP/ART - PPS-N NDF Updates File Transfer ;05/15/2017
+1 ;;4.0;NATIONAL DRUG FILE;**513**; 30 Oct 98;Build 53
+2 ;
+3 QUIT
+4 ;
VERIFY ; PPS-N installation verification
+1 NEW NOW,RUN,START,PSNHLD,NODE,JOB,TYPE
+2 DO NOW^%DTC
SET NOW=%
SET TYPE="I"
+3 SET JOB=0
FOR
SET JOB=$ORDER(^XTMP("PSN PPS VERIFY",JOB))
if 'JOB
QUIT
SET PSNHLD=""
FOR
SET PSNHLD=$ORDER(^XTMP("PSN PPS VERIFY",JOB,PSNHLD))
if PSNHLD=""
QUIT
SET NODE=$GET(^XTMP("PSN PPS VERIFY",JOB,PSNHLD,0))
Begin DoDot:1
+4 SET START=$PIECE(NODE,"^",2)
SET RUN=$$FMDIFF^XLFDT(NOW,START,2)
IF RUN>3600
Begin DoDot:2
+5 KILL ^XTMP("PSN PPS VERIFY",JOB,PSNHLD,0)
+6 DO MSG
End DoDot:2
End DoDot:1
+7 QUIT
+8 ;
MSG ; send error message to indicate installation did not complete
+1 NEW PSGRP,PSDA,PSNTXT,XMSUB,XMTEXT
+2 SET XMSUB="ERROR: PPS-N "_$SELECT(TYPE="D":"download",TYPE="I":"install",1:"")_" did not complete"
+3 SET PSNFILE=$SELECT($DATA(PSREMFIL):PSREMFIL,$DATA(PSNHLD):PSNHLD,1:"")
+4 IF $DATA(DUZ)
SET XMY(DUZ)=""
+5 SET PSDA=0
FOR
SET PSDA=$ORDER(^XUSEC("PSNMGR",PSDA))
if 'PSDA
QUIT
SET XMY(PSDA)=""
+6 SET PSGRP=""
SET PSGRP=$$GET1^DIQ(57.23,1,5)
IF PSGRP'=""
SET XMY($$MG^PSNPPSMG(PSGRP))=""
+7 SET PSGRP=""
SET PSGRP=$$GET1^DIQ(57.23,1,6)
IF PSGRP'=""
SET XMY($$MG^PSNPPSMG(PSGRP))=""
+8 SET PSNTXT(1)="**************************************************************************"
+9 SET PSNTXT(2)="*** An error occurred during "_$SELECT(TYPE="D":"download",1:"install")_" of the following Update file(s): ***"
+10 SET PSNTXT(3)="**************************************************************************"
+11 SET PSNTXT(4)="The following file(s) could not be "_$SELECT(TYPE="D":"downloaded",1:"installed")_":"
+12 SET PSNTXT(5)=""
+13 SET PSNTXT(6)=" Update file Name"
+14 SET PSNTXT(7)=" -------------------"
+15 SET PSNTXT(8)=" "_PSNFILE
+16 SET PSNTXT(9)=""
+17 SET PSNTXT(10)="Error: "_$$EC^%ZOSV
+18 SET PSNTXT(11)=""
+19 SET PSNTXT(12)="How to correct your error:"
+20 SET PSNTXT(13)="1. Rerun the "_$SELECT(TYPE="D":"downloaded",TYPE="I":"installed",1:"")_" option to re-attempt retrieval."
+21 SET PSNTXT(14)="2. Contact the National Help Desk or enter a ticket."
+22 SET PSNTXT(15)=""
+23 SET PSNTXT(16)="Further details can be found on the Download/Install Status Report option."
+24 SET XMTEXT="PSNTXT("
+25 DO ^XMD
KILL XMSUB,XMY,XMTEXT
+26 QUIT