PSXRSUS1 ;BIR/WPB,BAB,HTW-CMOP Transmission Handler sub routine ;15 Dec 2001
;;2.0;CMOP;**41,51**;11 Apr 97
;
STOREVAR ; store critical variables
S X1=DT,X2=+2 D C^%DTC S XXX=X K X1,X2
S ^XTMP("PSXTVARS "_$J,0)=XXX_U_DT_U_"variables for CMOP transmissions"
S ZZ=""
F X="PSXDIVML","PSOSITE","PSOLAP","PSOSYS","PSOPAR","PSXSYS","PSXTRANS","PSXFLAG","PRTDT","PSOINST","PSXDUZ","PSXSITE" S @X=$G(@X)
F X="PSXCS","PSXDAYS","PSXDTRG","PSOBARS","PSOBAR1","PSOBAR0","PSOPROP","PSXVENDR","PSLION","TPRTDT" S @X=$G(@X)
S ZZ=""
F YY="PSXDIVML^1","PSOSITE^2","PSOLAP^3","PSOSYS^4","PSOPAR^5","PSXSYS^6","PSXTRANS^7","PSXFLAG^8","PRTDT^9","PSOINST^10","PSXDUZ^11","PSXSITE^12" D SET^PSXUTL(.ZZ,U,YY)
S ^XTMP("PSXTVARS "_$J,1)=ZZ
S ZZ=""
F YY="PSXCS^1","PSXDAYS^2","PSXDTRG^3","PSOBARS^4","PSOBAR1^5","PSOBAR0^6","PSOPROP^7","PSXVENDR^8","PSLION^9","TPRTDT^10" D SET^PSXUTL(.ZZ,U,YY)
S ^XTMP("PSXTVARS "_$J,2)=ZZ
K XXX
Q
RESETVAR ; retrieve critical variables
S ZZ=^XTMP("PSXTVARS "_$J,1)
F YY="PSXDIVML^1","PSOSITE^2","PSOLAP^3","PSOSYS^4","PSOPAR^5","PSXSYS^6","PSXTRANS^7","PSXFLAG^8","PRTDT^9","PSOINST^10","PSXDUZ^11","PSXSITE^12" D SET^PSXUTL(.ZZ,U,YY)
S ZZ=^XTMP("PSXTVARS "_$J,2)
F YY="PSXCS^1","PSXDAYS^2","PSXDTRG^3","PSOBARS^4","PSOBAR1^5","PSOBAR0^6","PSOPROP^7","PSXVENDR^8","PSLION^9","TPRTDT^10" D PIECE^PSXUTL(ZZ,U,YY)
Q
PSXRSUS1 ;BIR/WPB,BAB,HTW-CMOP Transmission Handler sub routine ;15 Dec 2001
+1 ;;2.0;CMOP;**41,51**;11 Apr 97
+2 ;
STOREVAR ; store critical variables
+1 SET X1=DT
SET X2=+2
DO C^%DTC
SET XXX=X
KILL X1,X2
+2 SET ^XTMP("PSXTVARS "_$JOB,0)=XXX_U_DT_U_"variables for CMOP transmissions"
+3 SET ZZ=""
+4 FOR X="PSXDIVML","PSOSITE","PSOLAP","PSOSYS","PSOPAR","PSXSYS","PSXTRANS","PSXFLAG","PRTDT","PSOINST","PSXDUZ","PSXSITE"
SET @X=$GET(@X)
+5 FOR X="PSXCS","PSXDAYS","PSXDTRG","PSOBARS","PSOBAR1","PSOBAR0","PSOPROP","PSXVENDR","PSLION","TPRTDT"
SET @X=$GET(@X)
+6 SET ZZ=""
+7 FOR YY="PSXDIVML^1","PSOSITE^2","PSOLAP^3","PSOSYS^4","PSOPAR^5","PSXSYS^6","PSXTRANS^7","PSXFLAG^8","PRTDT^9","PSOINST^10","PSXDUZ^11","PSXSITE^12"
DO SET^PSXUTL(.ZZ,U,YY)
+8 SET ^XTMP("PSXTVARS "_$JOB,1)=ZZ
+9 SET ZZ=""
+10 FOR YY="PSXCS^1","PSXDAYS^2","PSXDTRG^3","PSOBARS^4","PSOBAR1^5","PSOBAR0^6","PSOPROP^7","PSXVENDR^8","PSLION^9","TPRTDT^10"
DO SET^PSXUTL(.ZZ,U,YY)
+11 SET ^XTMP("PSXTVARS "_$JOB,2)=ZZ
+12 KILL XXX
+13 QUIT
RESETVAR ; retrieve critical variables
+1 SET ZZ=^XTMP("PSXTVARS "_$JOB,1)
+2 FOR YY="PSXDIVML^1","PSOSITE^2","PSOLAP^3","PSOSYS^4","PSOPAR^5","PSXSYS^6","PSXTRANS^7","PSXFLAG^8","PRTDT^9","PSOINST^10","PSXDUZ^11","PSXSITE^12"
DO SET^PSXUTL(.ZZ,U,YY)
+3 SET ZZ=^XTMP("PSXTVARS "_$JOB,2)
+4 FOR YY="PSXCS^1","PSXDAYS^2","PSXDTRG^3","PSOBARS^4","PSOBAR1^5","PSOBAR0^6","PSOPROP^7","PSXVENDR^8","PSLION^9","TPRTDT^10"
DO PIECE^PSXUTL(ZZ,U,YY)
+5 QUIT