source: WorldVistAEHR/trunk/r/PATCH_MANAGEMNT-AAQ/AAQJCASE.m@ 1042

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

initial load of WorldVistAEHR

File size: 4.0 KB
Line 
1AAQJCASE ;CTC/DSC;ROUTINE NAME SAVER ;11-Mar-91; [5/25/99 4:01pm]
2 ;;1.4;AAQJ PATCH RECORD;; May 14, 1999
3 ;;FGO/JHS-Modified for Kernel V8.0 and OpenM ;04-20-98
4INIT I $G(DUZ(0))'="@" W !!,*7,"You don't have the necessary variables set up. Calling XUP." D ^XUP ;NOTE: Originally written for @ access
5 S U="^",CNT=0,(CHK,DO,DEL,DOO,II,KK,OPT,TXT,X,ZXX)="" K ^UTILITY($J)
6INTRO W ! F TX=0:1:17 W !,$P($T(TXT+TX),";",2)
7ASKOPT R "Select Option Number: ",X:$S($D(DTIME):DTIME,1:60) G:"12"'[$E(X,1) BADOPT G:X="" EXIT S OPT=$E(X,1)
8 W !!,$S(OPT=2:"'lower' to 'UPPER' case chosen? YES// ",OPT=1:"'UPPER' to 'lower' case chosen? YES// ") R DO:$S($D(DTIME):DTIME,1:60) W ! G:"nN"[$E(DO_1,1) INIT
9CHK W !,"Select routine(s) by the CURRENT name(s).",!,"Wild Card * and minus - selections may be used." D KERNEL^%RSET
10 I %R=0 W !,"No routines were selected." G EXIT
11 F CNT=1:1 S CHK=$O(^UTILITY($J,CHK)) I CHK="" Q
12 D DISPLAY,CKCASE G:AAQMIX=1 INIT W !!,"Do you wish to save as all ",$S(OPT=1:"lowercase",OPT=2:"UPPERCASE"),"? YES// " R DOO:$S($D(DTIME):DTIME,1:60) W ! G:"nN"[$E(DOO_1,1) INTRO
13 G:OPT=1 SAVLO
14SAVUP W "Saving as UPPERCASE." S ZX=0 F II=1:1 S ZXX="",ZX=$O(^UTILITY($J,ZX)) G:ZX="" ASKDEL D
15 .F KK=1:1:$L(ZX) S:$E(ZX,KK)?1L ZXX=ZXX_$C($A(ZX,KK)-32) S:$E(ZX,KK)'?1L ZXX=ZXX_$E(ZX,KK)
16 .S SAV="ZL @ZX ZS @ZXX" X SAV Q
17SAVLO W "Saving as lowercase." S ZX=0 F II=1:1 S ZXX="",ZX=$O(^UTILITY($J,ZX)) G:ZX="" EXIT D
18 .F KK=1:1:$L(ZX) S:$E(ZX,KK)?1U ZXX=ZXX_$C($A(ZX,KK)+32) S:$E(ZX,KK)'?1U ZXX=ZXX_$E(ZX,KK)
19 .S SAV="ZL @ZX ZS @ZXX" X SAV Q
20ASKDEL R !!,"Want to DELETE the lowercase routines? YES// ",DEL:$S($D(DTIME):DTIME,1:60) G:DEL["N"!(DEL["n") EXIT
21SHOW W ! S A=0,N=0 F N=0:1 S A=$O(^UTILITY($J,A)) Q:A="" W:N<7 ?N#8*10,A
22 W "...",!,N," Routines, use existing routine set? Y// " R X:60,! S:X="" X="Y" G:"Yy"[X RDEL
23 K ^UTILITY($J) D KERNEL^%RSET
24RDEL S X=0 S X=$O(^UTILITY($J,X)) Q:X=""
25 R !,"OK to Delete? NO// ",DEL:60 I "Nn"[DEL W $C(7),!,"No Routines Deleted" G EXIT
26 S NULL="" W ! X "F I=1:1 ZR ZS @X W:$X>78 ! W $E(X_"" "",1,10) S X=$O(^(X)) Q:X=NULL"
27EXIT W !,"Finished.",! K %R,%RN,%RS,%X,A,AAQ1RTN,AAQMIX,AAQOPT,AAQOPT1,AAQOPT2,AAQRCASE,CHK,CNT,DEL,DO,DOO,I,II,KK,N,NULL,OPT,SAV,TX,TXT,X,ZX,ZXX,^UTILITY($J)
28 Q
29BADOPT W $C(7),!!,"Reply with 1 or 2 or Press Return to Exit.",! G ASKOPT
30DISPLAY S $Y=0,%X=0 S %RN=0,%RS=0 F X=1:1 S %RS=$O(^UTILITY($J,%RS)) Q:%RS="" D:'(X-1#8) PAGE Q:%X W ?(X-1)#8*10,%RS S %RN=%RN+1,AAQ1RTN=%RS
31 Q
32CKCASE S AAQOPT1="'UPPERCASE to lowercase'",AAQOPT2="'lowercase to UPPERCASE'",AAQRCASE="",AAQMIX=0
33 I OPT=1,$E(AAQ1RTN,1)'?1U.E S AAQOPT=AAQOPT1,AAQRCASE="lowercase" G BADMIX
34 I OPT=2,$E(AAQ1RTN,1)'?1L.E S AAQOPT=AAQOPT2,AAQRCASE="UPPERCASE" G BADMIX
35 Q
36BADMIX W $C(7),!!,"Wait a minute. There seems to be something wrong here."
37 W !,"You selected Option ",OPT," for changing ",AAQOPT,"."
38 W !,"I checked one of the routines you selected and it was ",AAQRCASE,".",!,"That was an illogical choice or perhaps a simple typing mistake."
39 W !,"Regardless of the CASE, you will have to make your selections",!,"and read the instructions again."
40 R !!,"Press RETURN to continue: ",X:60
41 S AAQMIX=1 Q
42PAGE I $Y<21 W ! Q
43 R !!,"Press RETURN to continue, '^' to quit: ",X:60
44 Q:X=$A("^")
45 W ! S $Y=0,%X=0
46 Q
47TXT ; ***** ROUTINE NAME/CASE SAVER *****
48 ;
49 ;I'm going to use the routine(s) you select and change the names
50 ;from all uppercase to lowercase characters or vice-versa.
51 ;When you are changing from uppercase to lowercase, the original
52 ;routines will remain untouched and stored under the same name.
53 ;The result will be a duplicate set of routines with uppercase
54 ;names and lowercase names. When installing new routines, the
55 ;lowercase set may be useful for running routine compares.
56 ;When finished changing from lowercase to uppercase, you will be
57 ;asked if you want to automatically delete the lowercase routines.
58 ;
59 ;Select (by number) from the following:
60 ;
61 ; 1. UPPERCASE - lowercase (eg afvTXT3 - afvtxt3)
62 ; 2. lowercase - UPPERCASE (eg afvTXT3 - AFVTXT3)
Note: See TracBrowser for help on using the repository browser.