KIDS Distribution saved on Jul 26, 2016@15:53:57 Find strings or labels in routines c 2016 Jim Bell, BFP, LLC **KIDS**:VWBFPFND*1.0*0^ **INSTALL NAME** VWBFPFND*1.0*0 "BLD",8559,0) VWBFPFND*1.0*0^^0^3160726^n "BLD",8559,1,0) ^^1^1^3160726^ "BLD",8559,1,1,0) See installed option VWBFPFND "BLD",8559,4,0) ^9.64PA^^ "BLD",8559,6.3) 1 "BLD",8559,"KRN",0) ^9.67PA^779.2^20 "BLD",8559,"KRN",.4,0) .4 "BLD",8559,"KRN",.401,0) .401 "BLD",8559,"KRN",.402,0) .402 "BLD",8559,"KRN",.403,0) .403 "BLD",8559,"KRN",.5,0) .5 "BLD",8559,"KRN",.84,0) .84 "BLD",8559,"KRN",3.6,0) 3.6 "BLD",8559,"KRN",3.8,0) 3.8 "BLD",8559,"KRN",9.2,0) 9.2 "BLD",8559,"KRN",9.8,0) 9.8 "BLD",8559,"KRN",9.8,"NM",0) ^9.68A^1^1 "BLD",8559,"KRN",9.8,"NM",1,0) VWBFPFND^^0^B9263114 "BLD",8559,"KRN",9.8,"NM","B","VWBFPFND",1) "BLD",8559,"KRN",19,0) 19 "BLD",8559,"KRN",19,"NM",0) ^9.68A^1^1 "BLD",8559,"KRN",19,"NM",1,0) VWBFPFND^^0 "BLD",8559,"KRN",19,"NM","B","VWBFPFND",1) "BLD",8559,"KRN",19.1,0) 19.1 "BLD",8559,"KRN",101,0) 101 "BLD",8559,"KRN",409.61,0) 409.61 "BLD",8559,"KRN",771,0) 771 "BLD",8559,"KRN",779.2,0) 779.2 "BLD",8559,"KRN",870,0) 870 "BLD",8559,"KRN",8989.51,0) 8989.51 "BLD",8559,"KRN",8989.52,0) 8989.52 "BLD",8559,"KRN",8994,0) 8994 "BLD",8559,"KRN","B",.4,.4) "BLD",8559,"KRN","B",.401,.401) "BLD",8559,"KRN","B",.402,.402) "BLD",8559,"KRN","B",.403,.403) "BLD",8559,"KRN","B",.5,.5) "BLD",8559,"KRN","B",.84,.84) "BLD",8559,"KRN","B",3.6,3.6) "BLD",8559,"KRN","B",3.8,3.8) "BLD",8559,"KRN","B",9.2,9.2) "BLD",8559,"KRN","B",9.8,9.8) "BLD",8559,"KRN","B",19,19) "BLD",8559,"KRN","B",19.1,19.1) "BLD",8559,"KRN","B",101,101) "BLD",8559,"KRN","B",409.61,409.61) "BLD",8559,"KRN","B",771,771) "BLD",8559,"KRN","B",779.2,779.2) "BLD",8559,"KRN","B",870,870) "BLD",8559,"KRN","B",8989.51,8989.51) "BLD",8559,"KRN","B",8989.52,8989.52) "BLD",8559,"KRN","B",8994,8994) "BLD",8559,"QUES",0) ^9.62^^ "BLD",8559,"REQB",0) ^9.611^^ "KRN",19,11343,-1) 0^1 "KRN",19,11343,0) VWBFPFND^Find Routine Labels or Strings^^R^^^^^^^^ "KRN",19,11343,1,0) ^19.06^5^5^3160726^^ "KRN",19,11343,1,1,0) This is an alternative to the %RSE that not only lists all the "KRN",19,11343,1,2,0) routines from RSEL, but then lists ALL the routines, whether "KRN",19,11343,1,3,0) there is a hit or not. "KRN",19,11343,1,4,0) This routine will simply display target matches, simplifying "KRN",19,11343,1,5,0) the review. "KRN",19,11343,25) ASK^VWBFPFND "KRN",19,11343,"U") FIND ROUTINE LABELS OR STRINGS "MBREQ") 0 "ORD",18,19) 19;18;;;OPT^XPDTA;OPTF1^XPDIA;OPTE1^XPDIA;OPTF2^XPDIA;;OPTDEL^XPDIA "ORD",18,19,0) OPTION "QUES","XPF1",0) Y "QUES","XPF1","??") ^D REP^XPDH "QUES","XPF1","A") Shall I write over your |FLAG| File "QUES","XPF1","B") YES "QUES","XPF1","M") D XPF1^XPDIQ "QUES","XPF2",0) Y "QUES","XPF2","??") ^D DTA^XPDH "QUES","XPF2","A") Want my data |FLAG| yours "QUES","XPF2","B") YES "QUES","XPF2","M") D XPF2^XPDIQ "QUES","XPI1",0) YO "QUES","XPI1","??") ^D INHIBIT^XPDH "QUES","XPI1","A") Want KIDS to INHIBIT LOGONs during the install "QUES","XPI1","B") NO "QUES","XPI1","M") D XPI1^XPDIQ "QUES","XPM1",0) PO^VA(200,:EM "QUES","XPM1","??") ^D MG^XPDH "QUES","XPM1","A") Enter the Coordinator for Mail Group '|FLAG|' "QUES","XPM1","B") "QUES","XPM1","M") D XPM1^XPDIQ "QUES","XPO1",0) Y "QUES","XPO1","??") ^D MENU^XPDH "QUES","XPO1","A") Want KIDS to Rebuild Menu Trees Upon Completion of Install "QUES","XPO1","B") NO "QUES","XPO1","M") D XPO1^XPDIQ "QUES","XPZ1",0) Y "QUES","XPZ1","??") ^D OPT^XPDH "QUES","XPZ1","A") Want to DISABLE Scheduled Options, Menu Options, and Protocols "QUES","XPZ1","B") NO "QUES","XPZ1","M") D XPZ1^XPDIQ "QUES","XPZ2",0) Y "QUES","XPZ2","??") ^D RTN^XPDH "QUES","XPZ2","A") Want to MOVE routines to other CPUs "QUES","XPZ2","B") NO "QUES","XPZ2","M") D XPZ2^XPDIQ "RTN") 1 "RTN","VWBFPFND") 0^1^B9263114 "RTN","VWBFPFND",1,0) VWBFPFND ;WV/BFP/jBell Portland, OR display labels in routine(s) May 2016 "RTN","VWBFPFND",2,0) ;;**LOCAL**;;;;Build 1 "RTN","VWBFPFND",3,0) ;; This program is free software: you can redistribute it and/or modify "RTN","VWBFPFND",4,0) ;; it under the terms of the GNU General Public License as published by "RTN","VWBFPFND",5,0) ;; the Free Software Foundation, either version 3 of the License, or "RTN","VWBFPFND",6,0) ;; (at your option) any later version. "RTN","VWBFPFND",7,0) ;; "RTN","VWBFPFND",8,0) ;; This program is distributed in the hope that it will be useful, "RTN","VWBFPFND",9,0) ;; but WITHOUT ANY WARRANTY; without even the implied warranty of "RTN","VWBFPFND",10,0) ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the "RTN","VWBFPFND",11,0) ;; GNU General Public License for more details. "RTN","VWBFPFND",12,0) ;; "RTN","VWBFPFND",13,0) ;; You should have received a copy of the GNU General Public License "RTN","VWBFPFND",14,0) ;; along with this program. If not, see "RTN","VWBFPFND",15,0) Q "RTN","VWBFPFND",16,0) ; "RTN","VWBFPFND",17,0) LL ;Find labels or strings "RTN","VWBFPFND",18,0) ;*********************************************************** "RTN","VWBFPFND",19,0) ;*For gtm environs * "RTN","VWBFPFND",20,0) ;* After driving myself to Van Gogh level insanity trying * "RTN","VWBFPFND",21,0) ;* to remember line labels in only MY routines, or using * "RTN","VWBFPFND",22,0) ;* %RSE for string find and getting some several thousand * "RTN","VWBFPFND",23,0) ;* routine names AND being in a non-connective locale * "RTN","VWBFPFND",24,0) ;* (idyll fingers, etc, etc...) I finally did this routine * "RTN","VWBFPFND",25,0) ;* that will only list the targeted item in the routine * "RTN","VWBFPFND",26,0) ;* set. The immediate benefit: I still have 2 ears. * "RTN","VWBFPFND",27,0) ;*********************************************************** "RTN","VWBFPFND",28,0) ; "RTN","VWBFPFND",29,0) Q "RTN","VWBFPFND",30,0) ; "RTN","VWBFPFND",31,0) X W !?5 F I=1:1:10 W !,$T(LL+I^VWBFPFND) "RTN","VWBFPFND",32,0) W ! "RTN","VWBFPFND",33,0) Q "RTN","VWBFPFND",34,0) ; "RTN","VWBFPFND",35,0) C R !,"String: ",MATCH:30 "RTN","VWBFPFND",36,0) I '$L(MATCH) Q "RTN","VWBFPFND",37,0) E W !?10,"Searching for ",$S(WHAT="L":"LABEL ",1:"STRING "),""""_MATCH_"""" G @WHERE "RTN","VWBFPFND",38,0) ; "RTN","VWBFPFND",39,0) A G @WHERE "RTN","VWBFPFND",40,0) ; "RTN","VWBFPFND",41,0) ASK N WHAT,WHERE,ANS,R,X,I,J "RTN","VWBFPFND",42,0) D X "RTN","VWBFPFND",43,0) A2 K %ZR S ANS="" "RTN","VWBFPFND",44,0) W !!,"(L)abel only, (S)tring match in routine set?: " R WHAT:30 Q:'$L(WHAT) "RTN","VWBFPFND",45,0) S WHAT=$E($$UP^XLFSTR(WHAT),1) "RTN","VWBFPFND",46,0) S WHERE=$S(WHAT="L":"LAB",WHAT="S":"STR",WHAT="H":"HELP",1:"LAB") "RTN","VWBFPFND",47,0) S ANS="C" "RTN","VWBFPFND",48,0) S ANS=$E($$UP^XLFSTR(ANS),1) "RTN","VWBFPFND",49,0) A3 D @ANS "RTN","VWBFPFND",50,0) G A2 "RTN","VWBFPFND",51,0) ; "RTN","VWBFPFND",52,0) LAB D ^%RSEL "RTN","VWBFPFND",53,0) Q:$D(%ZR)#11 ;No selection array "RTN","VWBFPFND",54,0) D ^%ZIS U IO "RTN","VWBFPFND",55,0) S R="" F S R=$O(%ZR(R)) Q:R="" D "RTN","VWBFPFND",56,0) . S MATCH=$S('$L($G(MATCH)):"",1:MATCH) "RTN","VWBFPFND",57,0) . F I=1:1 S X=$T(@R+I^@R) Q:X="" S LABEL=$P(X," ") I $L(LABEL) D "RTN","VWBFPFND",58,0) .. I ANS="A",MATCH="" S %ZR(R,$O(%ZR(R," "),-1)+1)=X Q "RTN","VWBFPFND",59,0) .. I ANS="C",X[MATCH S %ZR(R,$O(%ZR(R," "),-1)+1)=X Q "RTN","VWBFPFND",60,0) .. I ANS="E",X=MATCH S %ZR(R,$O(%ZR(R," "),-1)+1)=X Q "RTN","VWBFPFND",61,0) D WR,^%ZISC "RTN","VWBFPFND",62,0) Q "RTN","VWBFPFND",63,0) ; "RTN","VWBFPFND",64,0) STR ;Strings in the code "RTN","VWBFPFND",65,0) I '$L(MATCH) W !?4,"Dude! No info!" Q "RTN","VWBFPFND",66,0) D ^%RSEL "RTN","VWBFPFND",67,0) Q:$D(%ZR)#11 ;No selection array "RTN","VWBFPFND",68,0) D ^%ZIS U IO "RTN","VWBFPFND",69,0) S R="" F S R=$O(%ZR(R)) Q:R="" D "RTN","VWBFPFND",70,0) . F I=1:1 S X=$T(@R+I^@R) Q:X="" D "RTN","VWBFPFND",71,0) .. F J=1:1:$L(X,MATCH) I X[MATCH S %ZR(R,$O(%ZR(" "),-1)+1)="+"_I_" ->"_X "RTN","VWBFPFND",72,0) D WR,^%ZISC "RTN","VWBFPFND",73,0) Q "RTN","VWBFPFND",74,0) ; "RTN","VWBFPFND",75,0) WR ;Go through %ZR array and only print path/routine name "RTN","VWBFPFND",76,0) ; target... "RTN","VWBFPFND",77,0) W !,"Searching for ",MATCH "RTN","VWBFPFND",78,0) S R="" F S R=$O(%ZR(R)) Q:R="" D:$O(%ZR(R,0)) "RTN","VWBFPFND",79,0) . W !,%ZR(R)_R "RTN","VWBFPFND",80,0) . S N=0 F S N=$O(%ZR(R,N)) Q:'+N W !?4,%ZR(R,N) "RTN","VWBFPFND",81,0) Q "RTN","VWBFPFND",82,0) ; "RTN","VWBFPFND",83,0) ;fini "VER") 8.0^22.0 **END** **END**