EAS114PT ; ALB/SCK - EAS*1.0*14 POST INSTALL CONVERSION ROUTINE ; 6/3/2002
;;1.0;ENROLLMENT APPLICATION SYSTEM;**14**;MAR 15,2001
;
EN ; Entry point for post installation routine
N ZX,COUNT,CNVRT,DR,DA,NODE0,NODE4,NODEZ,EASPRE
;
S DIR(0)="YAO",DIR("A")="Pre-scan for un-flagged 0-day letters? "
S DIR("B")="YES"
S DIR("?",1)="Pre-scan will provide the number of records which will have the 0-day"
S DIR("?",2)="Flag-to-Print flag set to 'YES' when this routine is run in the conversion mode."
S DIR("?",3)=""
S DIR("?")="Enter 'YES' to pre-scan, 'NO' to convert the 0-day print flags"
D ^DIR K DIR
Q:$D(DIRUT)
S EASPRE=Y
;
W !!!,"Beginning scan for un-flagged 0-day letters"
D WAIT^DICD W !
;
S (COUNT,ZX,CNVRT)=0
F S ZX=$O(^EAS(713.2,ZX)) Q:'ZX D
. S NODE0=$G(^EAS(713.2,ZX,0))
. S COUNT=COUNT+1 I (COUNT#100)=0 W "."
. Q:$P(NODE0,U,4)=1
. S NODE4=$G(^EAS(713.2,ZX,4))
. S NODEZ=$G(^EAS(713.2,ZX,"Z"))
. I $P(NODE4,U,3)=1 D
. . I +$P(NODEZ,U,2)=0 D
. . . I +$P(NODEZ,U,3)=0 D
. . . . I 'EASPRE D
. . . . . S DIE="^EAS(713.2,"
. . . . . S DR="18///1",DA=ZX
. . . . . D ^DIE K DIE
. . . . S CNVRT=CNVRT+1
;
W !?3,$FN(COUNT,",")," records scanned"
W !?3,$FN(CNVRT,",")," records "_$S(EASPRE:"will have",1:"had")_" the 0-day flag set to print"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HEAS114PT 1319 printed Dec 13, 2024@01:53:12 Page 2
EAS114PT ; ALB/SCK - EAS*1.0*14 POST INSTALL CONVERSION ROUTINE ; 6/3/2002
+1 ;;1.0;ENROLLMENT APPLICATION SYSTEM;**14**;MAR 15,2001
+2 ;
EN ; Entry point for post installation routine
+1 NEW ZX,COUNT,CNVRT,DR,DA,NODE0,NODE4,NODEZ,EASPRE
+2 ;
+3 SET DIR(0)="YAO"
SET DIR("A")="Pre-scan for un-flagged 0-day letters? "
+4 SET DIR("B")="YES"
+5 SET DIR("?",1)="Pre-scan will provide the number of records which will have the 0-day"
+6 SET DIR("?",2)="Flag-to-Print flag set to 'YES' when this routine is run in the conversion mode."
+7 SET DIR("?",3)=""
+8 SET DIR("?")="Enter 'YES' to pre-scan, 'NO' to convert the 0-day print flags"
+9 DO ^DIR
KILL DIR
+10 if $DATA(DIRUT)
QUIT
+11 SET EASPRE=Y
+12 ;
+13 WRITE !!!,"Beginning scan for un-flagged 0-day letters"
+14 DO WAIT^DICD
WRITE !
+15 ;
+16 SET (COUNT,ZX,CNVRT)=0
+17 FOR
SET ZX=$ORDER(^EAS(713.2,ZX))
if 'ZX
QUIT
Begin DoDot:1
+18 SET NODE0=$GET(^EAS(713.2,ZX,0))
+19 SET COUNT=COUNT+1
IF (COUNT#100)=0
WRITE "."
+20 if $PIECE(NODE0,U,4)=1
QUIT
+21 SET NODE4=$GET(^EAS(713.2,ZX,4))
+22 SET NODEZ=$GET(^EAS(713.2,ZX,"Z"))
+23 IF $PIECE(NODE4,U,3)=1
Begin DoDot:2
+24 IF +$PIECE(NODEZ,U,2)=0
Begin DoDot:3
+25 IF +$PIECE(NODEZ,U,3)=0
Begin DoDot:4
+26 IF 'EASPRE
Begin DoDot:5
+27 SET DIE="^EAS(713.2,"
+28 SET DR="18///1"
SET DA=ZX
+29 DO ^DIE
KILL DIE
End DoDot:5
+30 SET CNVRT=CNVRT+1
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
+31 ;
+32 WRITE !?3,$FNUMBER(COUNT,",")," records scanned"
+33 WRITE !?3,$FNUMBER(CNVRT,",")," records "_$SELECT(EASPRE:"will have",1:"had")_" the 0-day flag set to print"
+34 QUIT