VALMW1 ;MJK/ALB ;08:33 PM 14 Jan 1993; Conversion Help
;;1;List Manager;;Aug 13, 1993
;
EN ;;VALM Conversion Analyzer
N DIC,Y,VALMPKG,VALMPRE,Y
CONV W ! S DIC="^DIC(9.4,",DIC(0)="AEMQZ" D ^DIC K DIC G ENQ:Y<0
S VALMPKG=+Y,VALMPRE=$P(Y(0),U,2)
S %ZIS="PMQ" D ^%ZIS I POP G CONV
I '$D(IO("Q")) D
.D START
E D
.D QUE
D ^%ZISC G CONV
ENQ Q
;
START ; -- check for sdul references
N VALMI,VALMPGE,VALMPKGN,VALMY,VALMP,X,VALMHIT,VALMP0,VALMPI,VALMESC,VALMC
U IO
S VALMPKGN=$P($G(^DIC(9.4,VALMPKG,0)),U),VALMPGE=0
D HDR
W !!,">>> Will determine if package PROTOCOLS refer to 'SDUL'..."
S VALMC=VALMC+3,VALMP=VALMPRE,VALMESC=0
F S VALMP=$O(^ORD(101,"B",VALMP)) Q:VALMP=""!($E(VALMP,1,$L(VALMPRE))'=VALMPRE) D Q:VALMESC
.S VALMPI=0,VALMHIT=0
. F S VALMPI=$O(^ORD(101,"B",VALMP,VALMPI)) Q:'VALMPI D Q:VALMESC W:'VALMHIT "...nothing found"
..Q:'$D(^ORD(101,VALMPI,0)) S VALMP0=^(0)
..D CHK(2) Q:VALMESC W !!?5,"-> ",VALMP
..I $D(^ORD(101,VALMPI,20)),^(20)["SDUL" D CHK(1) Q:VALMESC W !?10,"Entry Action: ",^(20) S VALMHIT=1
..I $D(^ORD(101,VALMPI,15)),^(15)["SDUL" D CHK(1) Q:VALMESC W !?10,"Exit Action: ",^(15) S VALMHIT=1
..I $D(^ORD(101,VALMPI,26)),^(26)["SDUL" D CHK(1) Q:VALMESC W !?10,"Header Code: ",^(26) S VALMHIT=1
..S VALMI=0 K VALMY
..F S VALMI=$O(^ORD(101,VALMPI,10,VALMI)) Q:'VALMI S X=^(VALMI,0) D Q:VALMESC
...I $P($G(^ORD(101,+X,0)),U)["SDUL" S VALMY($P(^(0),U))=""
..I $D(VALMY),'VALMESC D
...S VALMHIT=1
...D CHK(1) Q:VALMESC W !?10,"Attached Protocols:"
...S X=""
...F S X=$O(VALMY(X)) Q:X="" D CHK(1) Q:VALMESC W !?15,"o ",X
D:'VALMESC TASKS
Q
;
HDR ; -- print header
S VALMPGE=VALMPGE+1
W @IOF,!?5,">>> List Manager Conversion Analyzer for '",VALMPKGN,"' <<<",?70,"Page: ",VALMPGE,!
S VALMC=2
Q
;
CHK(INCR) ; -- check for ff
N Y,X
I (VALMC+INCR+3)>IOSL D G CHKQ:VALMESC
.I $E(IOST,1,2)="C-" D PAUSE^VALM1 I 'Y S VALMESC=1 Q
.D HDR
S VALMC=VALMC+INCR
CHKQ Q
;
QUE ; -- que job
;
K ZTSK,IO("Q")
S ZTDESC="List Manager Conversion Analyzer",ZTRTN="START^VALMW1"
F X="VALMPRE","VALMPKG" S ZTSAVE(X)=""
D ^%ZTLOAD W:$D(ZTSK) " (Task: ",ZTSK,")"
Q
;
TASKS ; -- list tasks
N I,X
F I=1:1 S X=$P($T(HELP+I),";",3) Q:X="$END" D CHK(1) Q:VALMESC W !,X
Q
;
HELP ;
;;
;;
;; Conversion Task Outline
;; -----------------------
;;
;; 1) Change all references from SDUL to VALM in your routines
;; (Use a utility like VAX DSM's %RCE.)
;;
;; 2) Using the above report, change all code references from
;; SDUL to VALM in the indicated PROTOCOL fields.
;; (You can use the Workbench [DO ^VALMWB] to edit protocols.)
;;
;; 3) If you are going to use List Manager's new 'hidden' menu
;; capability, delete all SDUL protocols from your protocol
;; menus. Otherwise, change all SDUL protocols to VALM protocols
;; of the same name.
;;
;; (Note: If 'SDUL EXPAND' was attached to any of your menus
;; then you should always replace it with 'VALM EXPAND'.
;; The expand action is not part of 'VALM HIDDEN
;; ACTIONS' menu.)
;;
;; 4) If you are going to use 'hidden' menus, then use
;; the Workbench to indicate 'VALM HIDDEN ACTIONS'
;; as the template's hidden menu.
;;
;; 5) Finally, we recommend that you always use the Workbench to
;; make changes to your List Manager applications.
;;
;;$END
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVALMW1 3529 printed Nov 22, 2024@17:20:16 Page 2
VALMW1 ;MJK/ALB ;08:33 PM 14 Jan 1993; Conversion Help
+1 ;;1;List Manager;;Aug 13, 1993
+2 ;
EN ;;VALM Conversion Analyzer
+1 NEW DIC,Y,VALMPKG,VALMPRE,Y
CONV WRITE !
SET DIC="^DIC(9.4,"
SET DIC(0)="AEMQZ"
DO ^DIC
KILL DIC
if Y<0
GOTO ENQ
+1 SET VALMPKG=+Y
SET VALMPRE=$PIECE(Y(0),U,2)
+2 SET %ZIS="PMQ"
DO ^%ZIS
IF POP
GOTO CONV
+3 IF '$DATA(IO("Q"))
Begin DoDot:1
+4 DO START
End DoDot:1
+5 IF '$TEST
Begin DoDot:1
+6 DO QUE
End DoDot:1
+7 DO ^%ZISC
GOTO CONV
ENQ QUIT
+1 ;
START ; -- check for sdul references
+1 NEW VALMI,VALMPGE,VALMPKGN,VALMY,VALMP,X,VALMHIT,VALMP0,VALMPI,VALMESC,VALMC
+2 USE IO
+3 SET VALMPKGN=$PIECE($GET(^DIC(9.4,VALMPKG,0)),U)
SET VALMPGE=0
+4 DO HDR
+5 WRITE !!,">>> Will determine if package PROTOCOLS refer to 'SDUL'..."
+6 SET VALMC=VALMC+3
SET VALMP=VALMPRE
SET VALMESC=0
+7 FOR
SET VALMP=$ORDER(^ORD(101,"B",VALMP))
if VALMP=""!($EXTRACT(VALMP,1,$LENGTH(VALMPRE))'=VALMPRE)
QUIT
Begin DoDot:1
+8 SET VALMPI=0
SET VALMHIT=0
+9 FOR
SET VALMPI=$ORDER(^ORD(101,"B",VALMP,VALMPI))
if 'VALMPI
QUIT
Begin DoDot:2
+10 if '$DATA(^ORD(101,VALMPI,0))
QUIT
SET VALMP0=^(0)
+11 DO CHK(2)
if VALMESC
QUIT
WRITE !!?5,"-> ",VALMP
+12 IF $DATA(^ORD(101,VALMPI,20))
IF ^(20)["SDUL"
DO CHK(1)
if VALMESC
QUIT
WRITE !?10,"Entry Action: ",^(20)
SET VALMHIT=1
+13 IF $DATA(^ORD(101,VALMPI,15))
IF ^(15)["SDUL"
DO CHK(1)
if VALMESC
QUIT
WRITE !?10,"Exit Action: ",^(15)
SET VALMHIT=1
+14 IF $DATA(^ORD(101,VALMPI,26))
IF ^(26)["SDUL"
DO CHK(1)
if VALMESC
QUIT
WRITE !?10,"Header Code: ",^(26)
SET VALMHIT=1
+15 SET VALMI=0
KILL VALMY
+16 FOR
SET VALMI=$ORDER(^ORD(101,VALMPI,10,VALMI))
if 'VALMI
QUIT
SET X=^(VALMI,0)
Begin DoDot:3
+17 IF $PIECE($GET(^ORD(101,+X,0)),U)["SDUL"
SET VALMY($PIECE(^(0),U))=""
End DoDot:3
if VALMESC
QUIT
+18 IF $DATA(VALMY)
IF 'VALMESC
Begin DoDot:3
+19 SET VALMHIT=1
+20 DO CHK(1)
if VALMESC
QUIT
WRITE !?10,"Attached Protocols:"
+21 SET X=""
+22 FOR
SET X=$ORDER(VALMY(X))
if X=""
QUIT
DO CHK(1)
if VALMESC
QUIT
WRITE !?15,"o ",X
End DoDot:3
End DoDot:2
if VALMESC
QUIT
if 'VALMHIT
WRITE "...nothing found"
End DoDot:1
if VALMESC
QUIT
+23 if 'VALMESC
DO TASKS
+24 QUIT
+25 ;
HDR ; -- print header
+1 SET VALMPGE=VALMPGE+1
+2 WRITE @IOF,!?5,">>> List Manager Conversion Analyzer for '",VALMPKGN,"' <<<",?70,"Page: ",VALMPGE,!
+3 SET VALMC=2
+4 QUIT
+5 ;
CHK(INCR) ; -- check for ff
+1 NEW Y,X
+2 IF (VALMC+INCR+3)>IOSL
Begin DoDot:1
+3 IF $EXTRACT(IOST,1,2)="C-"
DO PAUSE^VALM1
IF 'Y
SET VALMESC=1
QUIT
+4 DO HDR
End DoDot:1
if VALMESC
GOTO CHKQ
+5 SET VALMC=VALMC+INCR
CHKQ QUIT
+1 ;
QUE ; -- que job
+1 ;
+2 KILL ZTSK,IO("Q")
+3 SET ZTDESC="List Manager Conversion Analyzer"
SET ZTRTN="START^VALMW1"
+4 FOR X="VALMPRE","VALMPKG"
SET ZTSAVE(X)=""
+5 DO ^%ZTLOAD
if $DATA(ZTSK)
WRITE " (Task: ",ZTSK,")"
+6 QUIT
+7 ;
TASKS ; -- list tasks
+1 NEW I,X
+2 FOR I=1:1
SET X=$PIECE($TEXT(HELP+I),";",3)
if X="$END"
QUIT
DO CHK(1)
if VALMESC
QUIT
WRITE !,X
+3 QUIT
+4 ;
HELP ;
+1 ;;
+2 ;;
+3 ;; Conversion Task Outline
+4 ;; -----------------------
+5 ;;
+6 ;; 1) Change all references from SDUL to VALM in your routines
+7 ;; (Use a utility like VAX DSM's %RCE.)
+8 ;;
+9 ;; 2) Using the above report, change all code references from
+10 ;; SDUL to VALM in the indicated PROTOCOL fields.
+11 ;; (You can use the Workbench [DO ^VALMWB] to edit protocols.)
+12 ;;
+13 ;; 3) If you are going to use List Manager's new 'hidden' menu
+14 ;; capability, delete all SDUL protocols from your protocol
+15 ;; menus. Otherwise, change all SDUL protocols to VALM protocols
+16 ;; of the same name.
+17 ;;
+18 ;; (Note: If 'SDUL EXPAND' was attached to any of your menus
+19 ;; then you should always replace it with 'VALM EXPAND'.
+20 ;; The expand action is not part of 'VALM HIDDEN
+21 ;; ACTIONS' menu.)
+22 ;;
+23 ;; 4) If you are going to use 'hidden' menus, then use
+24 ;; the Workbench to indicate 'VALM HIDDEN ACTIONS'
+25 ;; as the template's hidden menu.
+26 ;;
+27 ;; 5) Finally, we recommend that you always use the Workbench to
+28 ;; make changes to your List Manager applications.
+29 ;;
+30 ;;$END