ABMEFLAT ; IHS/DSD/DMJ - GENERATE FLAT FILE FROM MAIL MESSAGE ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
START ;START HERE
S DA=0 F S DA=$O(^XMB(3.9,"AF",DA)) Q:'DA D
.I $P(^XMB(3.9,DA,0),U)'["EMC CLAIMS FROM" K ^XMB(3.9,"AF",DA) Q
.D OPEN Q:POP
.D CREATE
.D NOW^%DTC
.S DIE="^XMB(3.9,",DR="1.98////"_% D ^DIE
.D ^%ZISC
Q
CREATE ;CREATE FLAT FILE FROM MAIL MSG TEXT
S I=.999 F S I=$O(^XMB(3.9,DA,2,I)) Q:'I D
.Q:POP
.U IO W ^XMB(3.9,DA,2,I,0),!
Q
OPEN ;OPEN HOST FILE
S %ZIS("B")="HOST FILE SERVER" D ^%ZIS Q:POP
S FILE=$P(IOPAR,":",1)
S FILE=$P(FILE,"(",2)
Q
ABMEFLAT ; IHS/DSD/DMJ - GENERATE FLAT FILE FROM MAIL MESSAGE ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
START ;START HERE
+1 SET DA=0
FOR
SET DA=$ORDER(^XMB(3.9,"AF",DA))
IF 'DA
QUIT
Begin DoDot:1
+2 IF $PIECE(^XMB(3.9,DA,0),U)'["EMC CLAIMS FROM"
KILL ^XMB(3.9,"AF",DA)
QUIT
+3 DO OPEN
IF POP
QUIT
+4 DO CREATE
+5 DO NOW^%DTC
+6 SET DIE="^XMB(3.9,"
SET DR="1.98////"_%
DO ^DIE
+7 DO ^%ZISC
End DoDot:1
+8 QUIT
CREATE ;CREATE FLAT FILE FROM MAIL MSG TEXT
+1 SET I=.999
FOR
SET I=$ORDER(^XMB(3.9,DA,2,I))
IF 'I
QUIT
Begin DoDot:1
+2 IF POP
QUIT
+3 USE IO
WRITE ^XMB(3.9,DA,2,I,0),!
End DoDot:1
+4 QUIT
OPEN ;OPEN HOST FILE
+1 SET %ZIS("B")="HOST FILE SERVER"
DO ^%ZIS
IF POP
QUIT
+2 SET FILE=$PIECE(IOPAR,":",1)
+3 SET FILE=$PIECE(FILE,"(",2)
+4 QUIT