[613] | 1 | ZVEMBLDL ;DJB,VSHL**VPE Setup - Load Editor & Shell ; 9/7/02 2:06pm
|
---|
| 2 | ;;12;VPE;;COPYRIGHT David Bolduc @1993
|
---|
| 3 | ;
|
---|
| 4 | TOP ;
|
---|
| 5 | D SHELL
|
---|
| 6 | I FLAGQ D G EX
|
---|
| 7 | . W !!,"VPE Shell global not loaded."
|
---|
| 8 | D EDITOR
|
---|
| 9 | W !!,"VPE Programmer Shell successfully loaded."
|
---|
| 10 | W !,"VPE full screen routine editor successfully loaded."
|
---|
| 11 | W !,"Initialization finished."
|
---|
| 12 | W !!,"NOTE: To start the VPE Shell, type: X ^%ZVEMS"
|
---|
| 13 | R !!,"<RETURN> to continue..",XX:300
|
---|
| 14 | D DISCLAIM^%ZVEMKU1
|
---|
| 15 | EX ;
|
---|
| 16 | Q
|
---|
| 17 | ;===================================================================
|
---|
| 18 | SHELL ;Load VPE Shell Global - ^%ZVEMS
|
---|
| 19 | S FLAGQ=0
|
---|
| 20 | ;W !!?2,"S T E P 2",!
|
---|
| 21 | D YESNO^ZVEMBLD("Load VPE Shell global: YES// ")
|
---|
| 22 | Q:FLAGQ
|
---|
| 23 | D ALL^ZVEMSG
|
---|
| 24 | Q
|
---|
| 25 | ;
|
---|
| 26 | EDITOR ;Load Editor into ^%ZVEMS("E") global
|
---|
| 27 | NEW CODE,I,TXT
|
---|
| 28 | ;S FLAGQ=0
|
---|
| 29 | ;W !!?2,"S T E P 1",!
|
---|
| 30 | ;D YESNO^ZVEMBLD("Install 'VPE Routine Editor': YES// ")
|
---|
| 31 | ;Q:FLAGQ
|
---|
| 32 | EDITOR1 ;
|
---|
| 33 | S TXT=$T(CODE+1)
|
---|
| 34 | S CODE=$P(TXT,";",3,99)
|
---|
| 35 | KILL ^%ZVEMS("E")
|
---|
| 36 | S ^%ZVEMS("E")=CODE
|
---|
| 37 | F I=2:1 S TXT=$T(CODE+I) Q:$P(TXT,";",3)="***" S CODE=$P(TXT,";",3,99),^%ZVEMS("E",I-1)=CODE
|
---|
| 38 | Q
|
---|
| 39 | ;
|
---|
| 40 | CODE ;Global for Rtn editing
|
---|
| 41 | ;;X ^%ZVEMS("E",3) Q:$G(DUZ)="" NEW FLAGSAVE,FLAGVPE,VEES NEW:$G(VEE("OS"))']"" VEE X ^%ZVEMS("E",4) Q:'$D(^TMP("VEE","VRR",$J)) X ^%ZVEMS("E",1) KILL ^UTILITY($J) L
|
---|
| 42 | ;;NEW %Y,VRRPGM,X D SAVE^%ZVEMRC(1) Q:$G(VRRPGM)']"" X ^%ZVEMS("E",2)
|
---|
| 43 | ;;NEW X S X=VRRPGM X VEES("ZS"),^%ZVEMS("E",5)
|
---|
| 44 | ;;Q:$G(DUZ)>0 S ^TMP("VEE",$J,1)=$G(%1),^(2)=$G(%2) D ID^%ZVEMKU S:$G(VEESHL)="RUN" %1=^TMP("VEE",$J,1),%2=^(2) KILL ^TMP("VEE",$J)
|
---|
| 45 | ;;S $P(FLAGVPE,"^",4)="EDIT" D PARAM^%ZVEMR($G(%1),$G(%2))
|
---|
| 46 | ;;Q:VEE("OS")'=17&(VEE("OS")'=19) NEW LINK,PGM S PGM=VRRPGM,PGM=$TR(PGM,"%","_") S LINK="ZLINK """_PGM_"""" X LINK
|
---|
| 47 | ;;***
|
---|