source: FOIAVistA/tag/r/TOOLKIT-AWCM-XD-XIN-XPAR-XQAB-XT-XUC-XUR-ZIN-ZTED/XTVNUM.m@ 1540

Last change on this file since 1540 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1XTVNUM ;SF-ISC/RWF - TO UPDATE THE VERSION NUMBER ;09 Apr 2003 8:24 am
2 ;;7.3;TOOLKIT;**20,39,70**;Apr 25, 1995
3GO W !!,"THIS ROUTINE WILL UPDATE THE VERSION NUMBER OR PATCH LIST"
4 W !,"IN THE ROUTINES SELECTED"
5 ;XTV(2)=New Version or Patch, 3=Version #, 4=Package Name, 5=Clear patch
6 ;6=Date
7 N BLDA,XTV,XTVPCH,DIC,DIR,Y,X K ^UTILITY($J)
8 S XTV(5)=0,XTV(2)=0
9 S DIR(0)="SM^F:Free Form;B:Build File",DIR("A")="Build from" D ^DIR K DIR Q:X[U
10 S XTV=Y G PKG:Y="F",BUILD:Y="B" Q
11 ;
12PKG W !,"Will only update the Version number.",!
13 X ^%ZOSF("RSEL") G EXIT:$O(^UTILITY($J,0))="",BLD
14 ;
15BUILD W !!,"This will use the BUILD file for the list of routines to update."
16 W !,"It will update the Patch number of the patch list."
17 S DIC="^XPD(9.6,",DIC(0)="AEMQZ" D ^DIC G EXIT:Y'>0 S BLDA=+Y
18 S X=$P(Y,"^",2),XTV(4)=$$PKG^XPDUTL(X),XTV(3)=$$VER^XPDUTL(X)
19 I X["*" D
20 . S XTV(3)=$P(X,"*",2),XTVPCH=$P(X,"*",3),XTV(4)=$$GET1^DIQ(9.6,BLDA_",",1),XTV(5)=0,XTV(2)=1
21 . S XTV(99)="S Y=(T?.E1P1"""_XTVPCH_"""1P.E)"
22 . Q
23 D RTN^XTRUTL1(BLDA)
24 G EXIT:$O(^UTILITY($J,""))=""
25 G 3
26 ;
27BLD K DIR
28 S DIR(0)="FA^1:8^K:'(X?1.2N1"".""1.2N.1(1""T"",1""V"").2N) X",DIR("A")="WHAT IS THE VERSION NUMBER: ",DIR("?")="Enter a number of the form nn.nn[Tnn or Vnn]"
29 D ^DIR G EXIT:$D(DIRUT) S XTV(3)=X
30 ;
312 K DIR
32 S DIR(0)="F^1:30^K:X[U X",DIR("A")="Package Name",DIR("?")="The package name will go into the 4th piece of the second line."
33 D ^DIR G EXIT:$D(DTOUT)!$D(DUOUT) S:X]"" XTV(4)=X
34 ;
353 I XTV(2) W !,"This date is only used if building a new second line."
36 K DIR S DIR(0)="D",DIR("A")="Enter the Version Date",DIR("?")="The DATE of this Version"
37 D ^DIR G EXIT:$D(DIRUT) S XTV(6)=$$FMTE^XLFDT(Y,1) W " ",XTV(6)
38 ;
39 K DIR S DIR(0)="Y",DIR("A")="Clear the 'Patch List'",DIR("B")="YES",DIR("?")="Answer YES to remove the list of patch numbers from the 5th piece of the second line."
40 I 'XTV(2) D ^DIR G EXIT:$D(DIRUT) S XTV(5)=Y
41 ;
42OK W " OK.",!
43 K DIR
44 S DIR("A",1)=" SETTING "_$S(XTV(2):"Patch",1:"Version")_" number to "_$S(XTV(2):XTVPCH,1:XTV(3)),DIR(0)="Y",DIR("A")=" Are you ready",DIR("B")="NO"
45 D ^DIR G:Y'=1 EXIT
46 W ! N AQ,CQ,I,SQ,DQ,R,T,T1,TO,TAB
47 S AQ="**",CQ=",",SQ=";",DQ=" ",R=0,T1=" ;;"_XTV(3)_SQ_XTV(4)_";;"_XTV(6)
48 ;DoIt
49 F I=0:0 S R=$O(^UTILITY($J,R)) Q:'$L(R) D XTV(R) W $J(R,9),?15,T,!
50 W !,"DONE",!
51EXIT K ^UTILITY($J),^TMP($J)
52 Q
53 ;
54XTV(RN) ;
55 N DIF,XCNP,DIE,XCN,IX,P
56 K ^TMP($J) S DIF="^TMP($J,",XCNP=0,X=RN X ^%ZOSF("LOAD")
57 S IX=2,(T,TO)=^TMP($J,IX,0)
58 S:T?.8E1" ;"1N.E $P(T,SQ)=$P(T,SQ)_SQ I T'?.8E1" ;;"1N.E S T=T1,IX=1.5,^TMP($J,IX,0)=T1
59 I 'XTV(2) S $P(T,SQ,3,4)=XTV(3)_SQ_XTV(4) S:XTV(5) $P(T,SQ,5)="" S $P(T,SQ,6)=XTV(6)
60 I XTV(2) X XTV(99) I 'Y S P=$P($P(T,SQ,5),AQ,2),P=AQ_$S($L(P):P_CQ_XTVPCH,1:XTVPCH)_AQ,$P(T,SQ,5)=P
61 I T'=TO S ^TMP($J,IX,0)=T
62 S DIE=DIF,XCN=0,X=RN X ^%ZOSF("SAVE")
63 Q
64 ;old code
65 ;X XTV(11),XTV(10):'XTV(2),XTV(12):XTV(2),XTV(15) W $J(R,9),?15,T,!"
66 ;ZR +2 ZI T ZS @R"
Note: See TracBrowser for help on using the repository browser.