Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PSXPURG1

PSXPURG1.m

Go to the documentation of this file.
  1. PSXPURG1 ;BIRM/WPB-CHECK PSX(552.1,"AP" FOR NOT PROCESSED BATCHES [ 04/08/97 2:06 PM ]
  1. ;;2.0;CMOP;;11 Apr 97
  1. CKAP K ^TMP($J,"PSXPROC")
  1. D NOW^%DTC S STRT=$$FMADD^XLFDT(%,-3,0,0,0),CNT=1 K %
  1. F S STRT=$O(^PSX(552.1,"AP",STRT)) Q:'STRT S BAT="" F S BAT=$O(^PSX(552.1,"AP",STRT,BAT)) Q:'BAT D CKAQ
  1. D MSG
  1. K STRT,BAT,CNT
  1. Q
  1. CKAQ S:$D(^PSX(552.2,"AQ",BAT)) ^TMP($J,"PSXPROC",CNT)=BAT,CNT=CNT+1
  1. Q
  1. MSG Q Q:'$D(^TMP($J,"PSXPROC"))
  1. S XMSUB="CMOP PROCESSED MSG",XMDUN="CMOP Manager"
  1. D XMZ^XMA2 G:XMZ'>0 MSG
  1. S FAC=$P(^PSX(553,1,0),"^")_" CMOP"
  1. S COM=$S($D(^TMP($J,"PSXPROC")):" has transmissions that are marked as processed that have data to go to the vendor.",1:" all transmissions processed correctly."),LCNT=1
  1. S ^XMB(3.9,XMZ,2,LCNT,0)=FAC_COM,LCNT=LCNT+1,^XMB(3.9,XMZ,2,LCNT,0)=" ",LCNT=LCNT+1
  1. I $D(^TMP($J,"PSXPROC")) D
  1. .S XX=0 F S XX=$O(^TMP($J,"PSXPROC",XX)) Q:XX'>0 S ^XMB(3.9,XMZ,2,LCNT,0)=$G(^TMP($J,"PSXPROC",XX))_" marked as processed but has data to send to the vendor.",LCNT=LCNT+1
  1. S ^XMB(3.9,XMZ,2,0)="^3.92A^"_LCNT_"^"_LCNT_"^"_DT,XMDUZ=.5
  1. K XMY D GRP^PSXNOTE D ENT1^XMD
  1. K XMSUB,XMDUN,XMZ,LCNT,^TMP($J,"PSXPROC"),FAC,COM,XMY,XMDUZ,XX
  1. Q