| 1 | AAQMENU ;FGO/JHS; Programmer Mode Menu ;03-06-98 [7/18/02 2:27pm]
 | 
|---|
| 2 |  ;;1.2;AAQ LOCAL;;Mar 6, 1998;For Kernel V8.0 and Intersystems Cache
 | 
|---|
| 3 |  ;;Logic and some code from AHJZSYS routines from 557/THM
 | 
|---|
| 4 |  I '$D(DTIME) W !,"DTIME is not set.  Calling XUP to set up required variables.",!,"Press RETURN at the Select OPTION NAME: prompt.",!! D ^XUP W !
 | 
|---|
| 5 |  I '$D(IOF) S IOP="HOME" D ^%ZIS K IOP S IOF=$S(IOST?1"C-".E:IOF,1:"!!")
 | 
|---|
| 6 |  S SAVIOF=IOF,LFIOF=IOF,VAR="N",CJVAR="N"
 | 
|---|
| 7 | ASKSLV S %=1 W !,"Do you want to Slave Print or Screen Capture",!,"using blank lines instead form feeds" D YN^DICN G:%=2 SETH I %=0 W !!,"If you answer NO, the menus will use normal form feeds." G ASKSLV
 | 
|---|
| 8 |  G:%=-1 SETH
 | 
|---|
| 9 |  W !!,"NOTE: Some options will not work properly using line feeds instead",!?6,"of form feeds.  The Editors and Read a Message will use the",!?6,"normal IOF value while in use and return to line feeds when done."
 | 
|---|
| 10 |  R !!,"Press RETURN to Continue, '^' to Exit: ",X:DTIME G:X="^" EXIT
 | 
|---|
| 11 |  S IOF="!!",LFIOF=IOF
 | 
|---|
| 12 | SETH S AAQH=3 ;Sets HANG to 3.  Change to another value if you wish.
 | 
|---|
| 13 |  S U="^" D UCI^%ZOSV S AAQUV=Y
 | 
|---|
| 14 |  I DUZ(0)'="@" W !,"DUZ(0) will be changed for programmer access!" D Q^DI W "  DUZ(0) = ",DUZ(0)
 | 
|---|
| 15 | MENU W @IOF,"Programmer Mode Menu for Package/Patch Installs:",!
 | 
|---|
| 16 |  W !,"UCI is: ",AAQUV,"   ","DUZ is: ",DUZ,DUZ(0),"  U='^'"
 | 
|---|
| 17 |  W !,"Today's $H, Date, and Time are: ",!
 | 
|---|
| 18 |  W $H,"    " S X=$$NOW^XLFDT W $$FMTE^XLFDT(X),!
 | 
|---|
| 19 |  W ! F I=1:1 S X=$T(OPT+I) Q:X["$END"  W ?($S(I<10:5,1:4)),I,".",?9,$P(X,";",3) W:X'["AAQ" ?45,"(",$P(X,";",2),")" W !
 | 
|---|
| 20 |  S N=I-1,AAQMSG="Please enter a number between 1 and "_N_"   "
 | 
|---|
| 21 | OPTION R !,?1,"Select Option Number: ",J:120 G:J[U!(J="") EXIT
 | 
|---|
| 22 |  I J'?1.N!((J<1)!(J>N)) W !!,$C(7),AAQMSG H 1 G MENU
 | 
|---|
| 23 |  S X=$T(OPT+J) W "   ",$P(X,";",3),!! D @$P(X,";",2)
 | 
|---|
| 24 |  S:SAVIOF'=LFIOF IOF=LFIOF
 | 
|---|
| 25 |  G MENU
 | 
|---|
| 26 |  ;
 | 
|---|
| 27 | OPT ;routine to execute;description
 | 
|---|
| 28 |  ;AAQINH;Inhibit ALL Logins
 | 
|---|
| 29 |  ;AAQENA;Enable Logins
 | 
|---|
| 30 |  ;AAQCJINH;Inhibit Sending Critical Jobs Alerts
 | 
|---|
| 31 |  ;AAQCJENA;Enable Sending Critical Jobs Alerts
 | 
|---|
| 32 |  ;AAQGLK;Control Unsubscripted Global Kills
 | 
|---|
| 33 |  ;^AAQMENUT;TaskMan Options
 | 
|---|
| 34 |  ;AAQXM;Read a Message
 | 
|---|
| 35 |  ;EN^AAQBAK;Make PackMan Backup Message
 | 
|---|
| 36 |  ;^XPDKRN;KIDS Menu
 | 
|---|
| 37 |  ;EN2^AAQBAK;KIDS - Backup a Transport Global
 | 
|---|
| 38 |  ;^AAQMENUR;Routines Options
 | 
|---|
| 39 |  ;Q^DI;FileMan Menu
 | 
|---|
| 40 |  ;AAQSS;System Status
 | 
|---|
| 41 |  ;AAQJOB;Examine Job                         (^JOBEXAM)
 | 
|---|
| 42 |  ;^AAQKILLS;Kill a Process                      (^AAQKILLS)
 | 
|---|
| 43 |  ;^XPDZPAT;Simple Patch Install
 | 
|---|
| 44 |  ;$END
 | 
|---|
| 45 | AAQINH S VAR="Y" W !,"This will prevent anyone from signing into the",!,"system, and from navigating through the menu tree.",!,"You can remain in Programmer Mode, while Inhibited.",!
 | 
|---|
| 46 |  W !,"WARNING: If you enter a menu from programmer mode using XQ1,",!,?9,"you will be logged off the system.",!
 | 
|---|
| 47 |  W !,"NOTE: The prompt 'Want KIDS to INHIBIT LOGONS during the install?'",!,"      should be answered with NO when you use this option.",!
 | 
|---|
| 48 |  W !,"When INHIBIT LOGONS is answered with YES, Logons are enabled",!,"as soon as the KIDS portion of the install is finished."
 | 
|---|
| 49 |  W !,"Using AAQMENU to Enable Logins will provide for more control",!,"as to when users should be able to sign on to the systems.",!
 | 
|---|
| 50 | ASK S %=2 W !,"Are you sure you want to inhibit all Logins, including yourself " D YN^DICN Q:(%<0)!(%=2)
 | 
|---|
| 51 |  I %=0 W !?7,"Answer YES if you are in Programmer Mode and want to inhibit logins." G ASK
 | 
|---|
| 52 |  G LOGMSG
 | 
|---|
| 53 | AAQENA S VAR="N"
 | 
|---|
| 54 | LOGMSG W !,"INHIBIT LOGINS field in the VOLUME SET file will be set to ",VAR,"." H AAQH
 | 
|---|
| 55 |  S DIC="^%ZIS(14.5,",DIC(0)="QEZ",X="ROU" D ^DIC S AAQ=$P(Y,U,1)
 | 
|---|
| 56 |  S DR="1///^S X=VAR",DIE="^%ZIS(14.5,",DA=AAQ D ^DIE K DIC
 | 
|---|
| 57 |  Q
 | 
|---|
| 58 | AAQCJINH S CJVAR="Y" W !,"When installing a patch that requires stopping a Critical Job,",!,"the Critical Jobs Monitor should Inhibit the sending of alerts.",!
 | 
|---|
| 59 |  W !,"Answer YES to INHIBIT CRITICAL JOBS MONITOR and stop sending alerts.",!
 | 
|---|
| 60 | CJASK S %=2 W !,"Are you sure you want to Inhibit sending Critical Job alerts " D YN^DICN Q:(%<0)  I %=2 S CJVAR="N" Q
 | 
|---|
| 61 |  I %=0 W !?5,"Answer YES to inhibit sending alerts.",!?5,"Answer NO to enable sending alerts." G CJASK
 | 
|---|
| 62 |  G CJMSG
 | 
|---|
| 63 | AAQCJENA S CJVAR="N"
 | 
|---|
| 64 | CJMSG W !,"INHIBIT CRITICAL JOB MONITOR field in the VOLUME SET file will be set to ",CJVAR,"." H AAQH
 | 
|---|
| 65 |  S DIC="^%ZIS(14.5,",DIC(0)="QEZ",X="ROU" D ^DIC S AAQ=$P(Y,U,1)
 | 
|---|
| 66 |  S DR="618001///^S X=CJVAR",DIE="^%ZIS(14.5,",DA=AAQ D ^DIE K DIC
 | 
|---|
| 67 |  Q
 | 
|---|
| 68 | AAQGLK I ^%ZOSF("OS")'["OpenM-NT" W $C(7),!,"This option should be run only on Intersystems Cache systems!  Exiting.",! H 2 Q
 | 
|---|
| 69 |  W !,"Protection for an Unsubscripted Global Node Kill"
 | 
|---|
| 70 | ASKGLK R !,"(E)nable, (D)isable, or '^' to leave this option: ",AAQX:DTIME
 | 
|---|
| 71 |  I AAQX?1L.E S AAQX=$$UP^XLFSTR(AAQX)
 | 
|---|
| 72 |  I AAQX="E" W !,"Global Kills have been Enabled using S X=$ZU(68,28,0)" S X=$ZU(68,28,0) H AAQH Q
 | 
|---|
| 73 |  I AAQX="D" W !,"Global Kills have been Disabled using S X=$ZU(68,28,1)" S X=$ZU(68,28,1) H AAQH Q
 | 
|---|
| 74 |  I AAQX="^" Q
 | 
|---|
| 75 |  W $C(7),!!,"You must answer with 'E', 'D', or '^'.",! G ASKGLK
 | 
|---|
| 76 | AAQXM S IOF=SAVIOF,XMMENU(0)="XMUSER" D LOCK^XM,REC^XMA H AAQH
 | 
|---|
| 77 |  D KILL^XM,UNLOCK^XM K XMMENU Q
 | 
|---|
| 78 | AAQBK D CHECKIN^XM,PAKMAN^XMJMS,CHECKOUT^XM H AAQH Q
 | 
|---|
| 79 | AAQJOB I ^%ZOSF("OS")'["OpenM-NT" W $C(7),!,"This option uses a Non-standard 'Z' command,",!,"which may only run on Intersystems Cache systems!  Exiting.",! H 2 Q
 | 
|---|
| 80 |  D UCI^%ZOSV S AAQU=$P(Y,",",1)
 | 
|---|
| 81 |  W !!,"JOBEXAM: Enter Process #, ? for System Status, or Press RETURN to skip."
 | 
|---|
| 82 |  ZN "%SYS" D ^JOBEXAM ZN AAQU Q
 | 
|---|
| 83 | AAQSS D:^%ZOSF("OS")["OpenM-NT" ^AAQSS Q:^%ZOSF("OS")["OpenM-NT"  W @IOF N DUZ,DT,DTIME X:$D(^%ZOSF("SS"))#2 ^("SS") D HOME^%ZIS Q
 | 
|---|
| 84 | EXIT I (VAR="Y")!(CJVAR="Y") W $C(7),!!,"REMINDER: You have INHIBIT LOGINS or INHIBIT CRITICAL JOBS MONITOR",!?10,"set to YES.  You should Enable when finished."
 | 
|---|
| 85 |  W ! K %,AAQ,AAQEA,AAQH,AAQMSG,AAQU,AAQUV,AAQX,CJVAR,DA,DIE,DR,I,J,LFIOF,N,SAVIOF,VAR,X,X1,Y D ^%ZISC Q
 | 
|---|