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

XQABLIST.m

Go to the documentation of this file.
XQABLIST ;ISC-SF.SEA/JLI - LIST USAGE OF OPTIONS IN ALPHA/BETA TEST ;1/19/95  14:24 [ 04/02/2003   8:29 AM ]
 ;;8.0;KERNEL;**1002,1003,1004,1005,1007**;APR 1, 2003
 ;;8.0;KERNEL;;Jul 10, 1995
 ;;
LOW ;
 W !! S XQINCR=1 S DIC="^XTV(8989.3,1,""ABPKG"",",DIC(0)="AEQM" D ^DIC G:Y'>0 KILL S XQDA=+Y,XQPKG=$P(Y,U,2)
 S %ZIS="QM" D ^%ZIS Q:POP  I $D(IO("Q")) K IO("Q") S ZTRTN="DQLOW^XQABLIST",ZTDESC="ALPHA/BETA PKG LOW OPTION USAGE",ZTIO=ION,ZTSAVE("XQDA")="",ZTSAVE("XQPKG")="",ZTSAVE("XQINCR")="" D ^%ZTLOAD K ZTRTN,ZTDESC,ZTIO,ZTSAVE D KILL G LOW
DQLOW U IO D GETDATA
 D ^%ZISC D KILL
 Q
 ;
ACTUAL ;
 W !! S XQINCR=0 S DIC="^XTV(8989.3,1,""ABPKG"",",DIC(0)="AEQM" D ^DIC G:Y'>0 KILL S XQDA=+Y,XQPKG=$P(Y,U,2)
 S %ZIS="QM" D ^%ZIS G:POP KILL I $D(IO("Q")) K IO("Q") S ZTRTN="DQACT^XQABLIST",ZTDESC="ACTUAL ALPHA/BETA OPTION USAGE",ZTIO=ION,ZTSAVE("XQINCR")="",ZTSAVE("XQDA")="",ZTSAVE("XQPKG")="" D ^%ZTLOAD K ZTRTN,ZTIO,ZTDESC,ZTSAVE D KILL G ACTUAL
DQACT U IO D GETDATA
 D ^%ZISC D KILL
 Q
 ;
GETDATA ;
 K ^TMP($J) S XQVERS=$P(^XTV(8989.3,1,"ABPKG",XQDA,0),U,4),XQDAT=$P(^(0),U,2) I XQVERS'?.E1"T"1N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^TMP($J,XQID,XQ1,XQA,XQ3)) Q:XQ3'>0  S X=^(XQ3),Z=$P(X,U,2) D:$D(XQMAIL) MAIL I '$D(XQMAIL),Z'>5!'XQINCR D OUT1
 Q
OUT1 ;
 S Y=^DIC(19,+X,0) D:($Y+4>IOSL) HEDR Q:XQUP  W !,$E($P(Y,U),1,24),?26,$P(Y,U,4),"   ",$J(+Z,6),"    ",$E($P(^(0),U,2),1,40)
 Q
MAIL ;
 S XQCNT=XQCNT+1,Y=^DIC(19,+X,0),^TMP($J,"A",XQCNT)=$E($E($P(Y,U),1,24)_XQBLNK,1,26)_$P(Y,U,4)_"    "_$J(+Z,6)_"   "_$E($P(Y,U,2),1,38)
 Q
 ;
SEND ;
 S XQADRS=$P(XQADRS,".VA.GOV") S:$E(XQADRS,$L(XQADRS))="." XQADRS=$E(XQADRS,1,$L(XQADRS)-1) S XQADRS=XQADRS_".VA.GOV"
 S ^TMP($J,"A",1)="   "_XQPKG_"  v"_XQVERS_"   ALPHA BETA OPTION USAGE SINCE "_XQDAT
 S ^TMP($J,"A",2)=$E("OPTION NAME"_XQBLNK,1,24)_"TYPE     COUNT    MENU TEXT"
 S XMSUB=XQPKG_" ALPHA/BETA TEST OPTION USAGE",XMTEXT="^TMP($J,""A"",",XMY(XQADRS)="",XMY(DUZ)="" D ^XMD K XMSUB,XMTEXT,XMY
 Q
 ;
DOMAIL S $P(XQBLNK," ",30)=" ",XQMAIL=1,XQINCR=0
 F XQM1=0:0 S XQM1=$O(^XTV(8989.3,1,"ABPKG",XQM1)) Q:XQM1'>0  S XQDA=XQM1,XQPKG=+^(XQM1,0),XQADRS=$P(^(0),U,3) I XQADRS?1"G."1U.E1"@"1U.E S XQPKG=$P(^DIC(9.4,XQPKG,0),U) S XQCNT=2 D GETDATA I $D(^TMP($J,"A")) D SEND
 D KILL
 Q
 ;
HEDR S XQUP=0 I '$D(ZTQUEUED),IOST["C-" R !?15,"Enter RETURN to continue....",XQX:DTIME I '$T!(XQX[U) K XQX S XQUP=1 Q
 K XQX W @IOF,!,XQPKG_"  v"_XQVERS_"   ALPHA/BETA OPTION USAGE SINCE "_XQDAT,!,"OPTION NAME",?24,"TYPE    COUNT    MENU TEXT",!
 Q
 ;
KILL K DIC,X,XQ0,XQ1,XQ2,XQ3,XQ4,XQA,XQADRS,XQBLNK,XQCNT,XQDA,XQID,XQM1,XQMAIL,XQPKG,XQUP,Y,Z,^TMP($J)