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

XQOO3.m

Go to the documentation of this file.
  1. XQOO3 ;Luke/Sea - Out-Of-Order Utilities ;01/14/97 13:57
  1. ;;8.0;KERNEL;**57**;Jul 10, 1995
  1. ;
  1. LALL ;List all options and protocols that are Out Of Order
  1. N XQ,XQMES,XQTXT,XQIEN
  1. S (XQIEN,XQS)=0
  1. F Q:XQIEN'=+XQIEN D
  1. .S XQIEN=$O(^DIC(19,XQIEN))
  1. .Q:XQIEN'=+XQIEN
  1. .I $D(^DIC(19,XQIEN,0)),$P(^(0),U,3)]"" D
  1. ..S XQMES=$P(^DIC(19,XQIEN,0),U,3),XQNM=$P(^(0),U),XQMT=$P(^(0),U,2)
  1. ..S ^TMP($J,"XQOO",XQMES,XQNM)=XQMT
  1. ..S:'$D(XQ(XQMES)) XQ(XQMES)=0,XQS=XQS+1 S XQ(XQMES)=XQ(XQMES)+1
  1. ..Q
  1. .Q
  1. ;
  1. I XQS=0 W !,"No options marked ""Out-Of-Order"" were found." Q
  1. I XQS=1 D
  1. .S XQMES="",XQMES=$O(XQ(XQMES))
  1. .W !,"There is one set of options marked ""Out-Of-Order"" with the message:",!!?5,XQMES
  1. .S XQN(1)=XQMES,XQUR=1
  1. .Q
  1. I XQS>1 W !,"There are "_XQS_" sets of options Out-Of-Order with the messages:" S %="" F XQI=1:1:XQS D
  1. .S %=$O(XQ(%)) W !!?1,XQI_".",?4,%," ("_XQ(%)_" option"_$S(XQ(%)=1:":",1:"s)")
  1. .I XQ(%)=1 S X=$O(^TMP($J,"XQOO",%,"")) W " ",X,", ",^(X),")"
  1. .S XQN(XQI)=%
  1. .Q
  1. ;
  1. ASK3 ;See a particular set in detail
  1. S DIR(0)="Y",DIR("A")="Would you like to see more detail?"
  1. S DIR("B")="NO",DIR("?")="If you enter YES you can see the options/protocols of a set."
  1. W ! D ^DIR G:Y=0!($D(DIRUT)) OUT
  1. I XQS>1 W !!,"To see the options of a particular set enter a number between 1 and "_XQS_": " R XQUR:DTIME
  1. I XQUR=U!(XQUR="") G OUT
  1. I XQUR["?"!(XQUR'=+XQUR)!(XQUR>XQS)!(XQUR<1) W !?5,"Enter a number between 1 and "_XQS,!?5,"or ""^"" to quit without seeing a detailed option set." G ASK3
  1. I XQUR=U!(XQUR="") G OUT
  1. S XQMES=XQN(XQUR)
  1. D HEAD(XQMES)
  1. S %=0 F XQI=1:1 S %=$O(^TMP($J,"XQOO",XQMES,%)) Q:%="" W !,XQI_".",?5,%," ",^(%)
  1. G OUT
  1. Q
  1. ;
  1. W @IOF
  1. W !,"Out-Of-Order with the message """_XQMES_"""",!!
  1. Q
  1. ;
  1. OUT ;Clean up and quit
  1. K X,XQI,XQMT,XQN,XQNM,XQS,XQUR
  1. K ^TMP($J,"XQOO")
  1. W !
  1. Q
  1. ;
  1. LAPR ;List all the protocols that are OOO
  1. N XQ,XQMES,XQTXT,XQIEN
  1. S (XQIEN,XQS)=0
  1. F Q:XQIEN'=+XQIEN D
  1. .S XQIEN=$O(^ORD(101,XQIEN))
  1. .Q:XQIEN'=+XQIEN
  1. .I $D(^ORD(101,XQIEN,0)),$P(^(0),U,3)]"" D
  1. ..S XQMES=$P(^ORD(101,XQIEN,0),U,3),XQNM=$P(^(0),U),XQMT=$P(^(0),U,2)
  1. ..S ^TMP($J,"XQOO",XQMES,XQNM)=XQMT
  1. ..S:'$D(XQ(XQMES)) XQ(XQMES)=0,XQS=XQS+1 S XQ(XQMES)=XQ(XQMES)+1
  1. ..Q
  1. .Q
  1. ;
  1. I XQS=0 W !,"No protocols marked ""Out-Of-Order"" were found." Q
  1. I XQS=1 D
  1. .S XQMES="",XQMES=$O(XQ(XQMES))
  1. .W !,"There is one set of protocols marked ""Out-Of-Order"" with the message:",!!?5,XQMES
  1. .S XQN(1)=XQMES
  1. .Q
  1. I XQS>1 W !,"There are "_XQS_" sets of protocols Out-Of-Order with the messages:" S %="" F XQI=1:1:XQS D
  1. .S %=$O(XQ(%)) W !!?1,XQI_".",?4,%," ("_XQ(%)_" protocol"_$S(XQ(%)=1:":",1:"s)")
  1. .I XQ(%)=1 S X=$O(^TMP($J,"XQOO",%,"")) W " ",X,", ",^(X),")"
  1. .S XQN(XQI)=%
  1. .Q
  1. ;
  1. ASK4 ;See a particular set in detail
  1. I XQS>1 D I XQUR=U G OUT
  1. .W !!,"To see the protocols of a particular set enter a number between 1 and "_XQS_": " R XQUR:DTIME
  1. .I XQUR=U!(XQUR="") S XQUR=U Q
  1. .I XQUR["?"!(XQUR'=+XQUR)!(XQUR>XQS)!(XQUR<1) D
  1. ..W !?5,"Enter a number between 1 and "_XQS,!?5,"or ""^"" to quit without seeing a detailed set." R XQUR:DTIME
  1. ..I XQUR=U!(XQUR="") S XQUR=U Q
  1. ..I XQUR'=+XQUR!(XQUR>XQS)!(XQUR<1) S XQUR=U
  1. ..Q
  1. .Q
  1. ;
  1. I XQS=1 D I XQUR=U G OUT
  1. .S DIR(0)="Y",DIR("A")="Do you want to see it in detail? ",DIR("B")="Y" D ^DIR K DIR
  1. .S XQUR=$S(Y=1:1,1:U)
  1. .Q
  1. ;
  1. S XQPAGE=$S($D(IOSL):IOSL,1:20),XQLINE=2
  1. S XQMES=XQN(XQUR)
  1. D HEAD(XQMES)
  1. S %=0 F XQI=1:1 S %=$O(^TMP($J,"XQOO",XQMES,%)) Q:%="" W !,XQI_".",?5,%," ",^(%),XQLINE," ",XQPAGE S XQLINE=XQLINE+1 I XQLINE=XQPAGE D PAUSE^XQOO2 S XQLINE=0 Q:$D(XQUPAR)
  1. G OUT
  1. Q