DINZMGR ;SFISC/MKO-TO SET UP THE MGR ACCOUNT FOR THE SYSTEM ;3:04 PM 1 Oct 1998
;;22.0;VA FileMan;;Mar 30, 1999;Build 1
;Per VHA Directive 10-93-142, this routine should not be modified.
;This is a modification of Kernel's ZTMGRSET routine.
I $D(^%ZTSK),$D(^%ZOSF("MGR"))#2 D Q
. W !,$C(7)_" The VA Kernel appears to be installed on the system."
. W !," ^DINZMGR should only be used during a stand-alone VA FileMan installation.",!
;
S U="^"
D INTRO^DINZMGR1
;
K DIR
S DIR("A",1)="Do you wish to proceed"
S DIR("B")="YES"
S DIR("?",1)="Enter 'Y' to continue. Enter 'N' or '^' to quit."
D DIR K DIR G:$D(DIQUIT)!'Y Q
;
D ZS G:$D(DIQUIT)!'Y Q
D OS^DINZMGR1 G:$D(DIQUIT) Q
;
I $D(^%ZOSF("UCI")) X ^("UCI") I Y'["MG" D G:$D(DIQUIT)!'Y Q
. K DIR
. S DIR("A",1)="THIS MAY NOT BE THE MANAGER UCI."
. S DIR("A",2)="I think it is "_Y_". Should I continue anyway"
. S DIR("B")="NO"
. S DIR("?",1)="This routine will attempt to file some % routines and set nodes"
. S DIR("?",2)="in the %ZOSF global. It should therefore be run in the manager"
. S DIR("?",3)="account."
. D DIR K DIR
;
D DT G:$D(DIQUIT) Q
D ZIS G:$D(DIQUIT) Q
D ZISS G:$D(DIQUIT) Q
D ZOSF G:$D(DIQUIT) Q
W !!,"ALL DONE",!
G Q
;
ZS K DIR
S DIR("A",1)="Are the ZLOAD and ZSAVE commands implemented"
S DIR("A",2)="on your MUMPS operating system (Y/N)"
S DIR("?",1)="Since this utility will use ZLOAD and ZSAVE to file some routines"
S DIR("?",2)="under different names, you can use this utility only if those"
S DIR("?",3)="commands are available. Otherwise, you'll have to perform the"
S DIR("?",4)="operations manually."
D DIR K DIR Q:$D(DIQUIT)
Q
DT K DIR
S DIR("A",1)="Do you want to save DIDT, DIDTC, and DIRCR"
S DIR("A",2)="as %DT, %DTC, and %RCR"
S DIR("B")="YES"
S DIR("?",1)="Enter 'YES' to refile the routines. This step must be performed",DIR("?",2)="in order for FileMan to work properly."
D DIR K DIR Q:$D(DIQUIT)!'Y
W ! S %S="DIDT^DIDTC^DIRCR",%D="%DT^%DTC^%RCR" D MOVE
Q
ZIS K DIR
S DIR("A",1)="Do you want to save DIIS as %ZIS (Y/N)"
S DIR("?",1)="Enter 'YES' if you want to save the FileMan-supplied DIIS routine",DIR("?",2)="as %ZIS."
D DIR K DIR Q:$D(DIQUIT)!'Y
W ! S %S="DIIS",%D="%ZIS" D MOVE
Q
ZISS K DIR
S DIR("A",1)="Do you want to save DIISS as %ZISS (Y/N)"
S DIR("?",1)="Enter 'YES' if you want to save the FileMan-supplied DIISS routine",DIR("?",2)="as %ZISS."
D DIR K DIR Q:$D(DIQUIT)!'Y
W ! S %S="DIISS",%D="%ZISS" D MOVE
Q
ZOSF S DIR("A",1)="Do you want me to set nodes in the ^%ZOSF global and"
S DIR("A",2)="to file the %ZOSV routine (and possibly the %ZOSV1 routine)"
S DIR("A",3)="appropriate for the MUMPS operating system you are using (Y/N)"
S DIR("?",1)="FileMan's screen-oriented utilities require certain %ZOSF nodes"
S DIR("?",2)="to be present. Some of these nodes call %ZOSV and %ZOSV1,"
S DIR("?",3)="so those routines must also be present."
D DIR K DIR S:'Y DIQUIT=1 Q:$D(DIQUIT)
W ! S %D="%ZOSV" D @DIOS
Q
1 ;M/11
;S %S="DINVM11" D MOVE
;D ^DINZM11
Q
2 ;M/SQL-PDP
;S %S="DINVM11P" D MOVE
;D ^DINZM11P
Q
3 ;CACHE/OpenM;was M/SQL;before that, was M/SQL-VAX
;W !?3,$C(7)_"M/SQL is not yet supported."
;S %S="DINVMVX" D MOVE
;D ^DINZMVX
S %S="DINVONT" D MOVE
D ^DINZONT
Q
4 ;DSM-4
;S %S="DINVDSM" D MOVE
;D ^DINZDSM
Q
5 ;DSM for OpenVMS;was VAX DSM(V6)
S %S="DINVVXD" D MOVE
S %S="DINV1VXD",%D="%ZOSV1" D MOVE
D ^DINZVXD
Q
6 ;MSM
S %S="DINVMSM" D MOVE
D ^DINZMSM
Q
7 ;DTM-PC
S %S="DINVDTM" D MOVE
S %S="DINV1DTM",%D="%ZOSV1" D MOVE
D ^DINZDTM
Q
8 ;GT.M(VAX)
;W !?3,$C(7)_"GT.M(VAX) is not yet supported."
;S %S="DINVGTM" D MOVE
;S %S="DINV1GTM",%D="%ZOSV1" D MOVE
;D ^DINZGTM
Q
;
MOVE F %=1:1:$L(%D,U) S X=$P(%S,U,%),Y=$P(%D,U,%) I X]"",Y]"" W !,"Loading ",X X "ZL @X ZS @Y" W ?20,"Saved as ",Y
K %S,%D
Q
Q K %,X,X1,Y,DIOS,DIQUIT,DISAVE
Q
DIR K DIQUIT S Y=0 W ! F %=1:1 Q:'$D(DIR("A",%)) W !,DIR("A",%)
W "? "_$S($D(DIR("B")):DIR("B")_"// ",1:"")
R X:300 S:X="" X=$S($D(DIR("B")):DIR("B"),1:"NULL")
I X[U!'$T S DIQUIT=1 Q
I $P("NO",$TR(X,"no","NO"))="" S Y=0 Q
I $P("YES",$TR(X,"yes","YES"))="" S Y=1 Q
I X?1."?",$D(DIR("?")) D G DIR
. W ! F %=1:1 Q:'$D(DIR("?",%)) W !?5,DIR("?",%)
W $C(7),!!?5,"Enter 'YES' or 'NO', or '^' to quit." G DIR
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDINZMGR 4396 printed Nov 22, 2024@18:02:16 Page 2
DINZMGR ;SFISC/MKO-TO SET UP THE MGR ACCOUNT FOR THE SYSTEM ;3:04 PM 1 Oct 1998
+1 ;;22.0;VA FileMan;;Mar 30, 1999;Build 1
+2 ;Per VHA Directive 10-93-142, this routine should not be modified.
+3 ;This is a modification of Kernel's ZTMGRSET routine.
+4 IF $DATA(^%ZTSK)
IF $DATA(^%ZOSF("MGR"))#2
Begin DoDot:1
+5 WRITE !,$CHAR(7)_" The VA Kernel appears to be installed on the system."
+6 WRITE !," ^DINZMGR should only be used during a stand-alone VA FileMan installation.",!
End DoDot:1
QUIT
+7 ;
+8 SET U="^"
+9 DO INTRO^DINZMGR1
+10 ;
+11 KILL DIR
+12 SET DIR("A",1)="Do you wish to proceed"
+13 SET DIR("B")="YES"
+14 SET DIR("?",1)="Enter 'Y' to continue. Enter 'N' or '^' to quit."
+15 DO DIR
KILL DIR
if $DATA(DIQUIT)!'Y
GOTO Q
+16 ;
+17 DO ZS
if $DATA(DIQUIT)!'Y
GOTO Q
+18 DO OS^DINZMGR1
if $DATA(DIQUIT)
GOTO Q
+19 ;
+20 IF $DATA(^%ZOSF("UCI"))
XECUTE ^("UCI")
IF Y'["MG"
Begin DoDot:1
+21 KILL DIR
+22 SET DIR("A",1)="THIS MAY NOT BE THE MANAGER UCI."
+23 SET DIR("A",2)="I think it is "_Y_". Should I continue anyway"
+24 SET DIR("B")="NO"
+25 SET DIR("?",1)="This routine will attempt to file some % routines and set nodes"
+26 SET DIR("?",2)="in the %ZOSF global. It should therefore be run in the manager"
+27 SET DIR("?",3)="account."
+28 DO DIR
KILL DIR
End DoDot:1
if $DATA(DIQUIT)!'Y
GOTO Q
+29 ;
+30 DO DT
if $DATA(DIQUIT)
GOTO Q
+31 DO ZIS
if $DATA(DIQUIT)
GOTO Q
+32 DO ZISS
if $DATA(DIQUIT)
GOTO Q
+33 DO ZOSF
if $DATA(DIQUIT)
GOTO Q
+34 WRITE !!,"ALL DONE",!
+35 GOTO Q
+36 ;
ZS KILL DIR
+1 SET DIR("A",1)="Are the ZLOAD and ZSAVE commands implemented"
+2 SET DIR("A",2)="on your MUMPS operating system (Y/N)"
+3 SET DIR("?",1)="Since this utility will use ZLOAD and ZSAVE to file some routines"
+4 SET DIR("?",2)="under different names, you can use this utility only if those"
+5 SET DIR("?",3)="commands are available. Otherwise, you'll have to perform the"
+6 SET DIR("?",4)="operations manually."
+7 DO DIR
KILL DIR
if $DATA(DIQUIT)
QUIT
+8 QUIT
DT KILL DIR
+1 SET DIR("A",1)="Do you want to save DIDT, DIDTC, and DIRCR"
+2 SET DIR("A",2)="as %DT, %DTC, and %RCR"
+3 SET DIR("B")="YES"
+4 SET DIR("?",1)="Enter 'YES' to refile the routines. This step must be performed"
SET DIR("?",2)="in order for FileMan to work properly."
+5 DO DIR
KILL DIR
if $DATA(DIQUIT)!'Y
QUIT
+6 WRITE !
SET %S="DIDT^DIDTC^DIRCR"
SET %D="%DT^%DTC^%RCR"
DO MOVE
+7 QUIT
ZIS KILL DIR
+1 SET DIR("A",1)="Do you want to save DIIS as %ZIS (Y/N)"
+2 SET DIR("?",1)="Enter 'YES' if you want to save the FileMan-supplied DIIS routine"
SET DIR("?",2)="as %ZIS."
+3 DO DIR
KILL DIR
if $DATA(DIQUIT)!'Y
QUIT
+4 WRITE !
SET %S="DIIS"
SET %D="%ZIS"
DO MOVE
+5 QUIT
ZISS KILL DIR
+1 SET DIR("A",1)="Do you want to save DIISS as %ZISS (Y/N)"
+2 SET DIR("?",1)="Enter 'YES' if you want to save the FileMan-supplied DIISS routine"
SET DIR("?",2)="as %ZISS."
+3 DO DIR
KILL DIR
if $DATA(DIQUIT)!'Y
QUIT
+4 WRITE !
SET %S="DIISS"
SET %D="%ZISS"
DO MOVE
+5 QUIT
ZOSF SET DIR("A",1)="Do you want me to set nodes in the ^%ZOSF global and"
+1 SET DIR("A",2)="to file the %ZOSV routine (and possibly the %ZOSV1 routine)"
+2 SET DIR("A",3)="appropriate for the MUMPS operating system you are using (Y/N)"
+3 SET DIR("?",1)="FileMan's screen-oriented utilities require certain %ZOSF nodes"
+4 SET DIR("?",2)="to be present. Some of these nodes call %ZOSV and %ZOSV1,"
+5 SET DIR("?",3)="so those routines must also be present."
+6 DO DIR
KILL DIR
if 'Y
SET DIQUIT=1
if $DATA(DIQUIT)
QUIT
+7 WRITE !
SET %D="%ZOSV"
DO @DIOS
+8 QUIT
1 ;M/11
+1 ;S %S="DINVM11" D MOVE
+2 ;D ^DINZM11
+3 QUIT
2 ;M/SQL-PDP
+1 ;S %S="DINVM11P" D MOVE
+2 ;D ^DINZM11P
+3 QUIT
3 ;CACHE/OpenM;was M/SQL;before that, was M/SQL-VAX
+1 ;W !?3,$C(7)_"M/SQL is not yet supported."
+2 ;S %S="DINVMVX" D MOVE
+3 ;D ^DINZMVX
+4 SET %S="DINVONT"
DO MOVE
+5 DO ^DINZONT
+6 QUIT
4 ;DSM-4
+1 ;S %S="DINVDSM" D MOVE
+2 ;D ^DINZDSM
+3 QUIT
5 ;DSM for OpenVMS;was VAX DSM(V6)
+1 SET %S="DINVVXD"
DO MOVE
+2 SET %S="DINV1VXD"
SET %D="%ZOSV1"
DO MOVE
+3 DO ^DINZVXD
+4 QUIT
6 ;MSM
+1 SET %S="DINVMSM"
DO MOVE
+2 DO ^DINZMSM
+3 QUIT
7 ;DTM-PC
+1 SET %S="DINVDTM"
DO MOVE
+2 SET %S="DINV1DTM"
SET %D="%ZOSV1"
DO MOVE
+3 DO ^DINZDTM
+4 QUIT
8 ;GT.M(VAX)
+1 ;W !?3,$C(7)_"GT.M(VAX) is not yet supported."
+2 ;S %S="DINVGTM" D MOVE
+3 ;S %S="DINV1GTM",%D="%ZOSV1" D MOVE
+4 ;D ^DINZGTM
+5 QUIT
+6 ;
MOVE FOR %=1:1:$LENGTH(%D,U)
SET X=$PIECE(%S,U,%)
SET Y=$PIECE(%D,U,%)
IF X]""
IF Y]""
WRITE !,"Loading ",X
XECUTE "ZL @X ZS @Y"
WRITE ?20,"Saved as ",Y
+1 KILL %S,%D
+2 QUIT
Q KILL %,X,X1,Y,DIOS,DIQUIT,DISAVE
+1 QUIT
DIR KILL DIQUIT
SET Y=0
WRITE !
FOR %=1:1
if '$DATA(DIR("A",%))
QUIT
WRITE !,DIR("A",%)
+1 WRITE "? "_$SELECT($DATA(DIR("B")):DIR("B")_"// ",1:"")
+2 READ X:300
if X=""
SET X=$SELECT($DATA(DIR("B")):DIR("B"),1:"NULL")
+3 IF X[U!'$TEST
SET DIQUIT=1
QUIT
+4 IF $PIECE("NO",$TRANSLATE(X,"no","NO"))=""
SET Y=0
QUIT
+5 IF $PIECE("YES",$TRANSLATE(X,"yes","YES"))=""
SET Y=1
QUIT
+6 IF X?1."?"
IF $DATA(DIR("?"))
Begin DoDot:1
+7 WRITE !
FOR %=1:1
if '$DATA(DIR("?",%))
QUIT
WRITE !?5,DIR("?",%)
End DoDot:1
GOTO DIR
+8 WRITE $CHAR(7),!!?5,"Enter 'YES' or 'NO', or '^' to quit."
GOTO DIR
+9 QUIT