Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ZTPTCH

ZTPTCH.m

Go to the documentation of this file.
  1. ZTPTCH ;557/THM,SFISC/RSD-DISPLAY PATCHES FOR SELECTED ROUTINES ;08/06/97 10:52
  1. ;;8.0;KERNEL;**44,65**;Jul 10, 1995
  1. N ZTSK,%ZIS,IOP
  1. K ^UTILITY($J)
  1. W !,"Display Patches for Selected Routines",!!
  1. X ^%ZOSF("RSEL") I '$D(^UTILITY($J)) W !!,*7,"No routines were selected.",!! H 2 G EXIT
  1. W !! S %ZIS="MQ" D ^%ZIS G:POP EXIT
  1. I $D(IO("Q")) K IO("Q") S ZTDESC="Installed Patch Listing",ZTRTN="TASK^ZTPTCH",ZTSAVE("^UTILITY($J,")="" D ^%ZTLOAD
  1. I $D(ZTSK) W !!,"Request queued.",!! G EXIT
  1. ;
  1. TASK ;
  1. N CNT,CNTR,DATE,LINE,PNUM,PG,QUIT,RTN,UCI,X,Y,Z,Z1
  1. K ^TMP("ZTPTCH",$J)
  1. W:'$D(ZTQUEUED) !!,"Processing routines..."
  1. S RTN=0 F S RTN=$O(^UTILITY($J,RTN)) Q:RTN="" D W:'$D(ZTQUEUED) "."
  1. .S X=$T(+2^@RTN) Q:X="" S Y=$P(X,"**",2)
  1. .F Z=1:1 S Z1=$P(Y,",",Z) Q:(Z1="") S ^TMP("ZTPTCH",$J,Z1,RTN)=""
  1. ;
  1. S U="^" D NOW^%DTC S Y=% D DD^%ZTPP S DATE=Y
  1. X ^%ZOSF("UCI") S UCI=Y,$P(LINE,"-",IOM)=""
  1. S (CNT,CNTR,PG,QUIT)=0
  1. U IO D HDR S PNUM=""
  1. F S PNUM=$O(^TMP("ZTPTCH",$J,PNUM)) Q:PNUM=""!QUIT W !! S RTN="",Z1=0 F Z=2:1 S RTN=$O(^TMP("ZTPTCH",$J,PNUM,RTN)) Q:RTN="" D Q:QUIT
  1. .I Z1=0 W PNUM S CNT=CNT+1
  1. .W ?Z-1#8*10,RTN S CNTR=CNTR+1
  1. .I (Z#8)=0,$O(^TMP("ZTPTCH",$J,PNUM,RTN))]"" D:$Y>(IOSL-6) HDR S Z=1 W !?Z-1#8*10 ;end of line
  1. .I $Y>(IOSL-6),(Z#8)=0,$O(^TMP("ZTPTCH",$J,PNUM,RTN))]"" D HDR S Z=1 W !?Z-1#8*10 ;end of page, more of same patch
  1. .I $Y>(IOSL-6),$O(^TMP("ZTPTCH",$J,PNUM,RTN))="" D HDR S Z=1 W !?Z-1#8*10 ;end of page, no more on same patch.
  1. .S Z1=1
  1. .Q
  1. W !!?10,"Total Patches = ",CNT," Total Routines = ",CNTR
  1. I IOST?1"C-".E,'QUIT S X=$$RD(0)
  1. EXIT K ^UTILITY($J),^TMP("ZTPTCH",$J)
  1. D ^%ZISC
  1. Q
  1. RD(X) ;
  1. W !!,"Enter RETURN to "_$S(X:"continue or '^' to exit: ",1:"end: ")
  1. R X:300
  1. Q ($E(X)="^")
  1. ;
  1. HDR I IOST?1"C-".E,PG'=0,'$D(ZTQUEUED),$$RD(1) S QUIT=1 Q
  1. W:PG>0 @IOF S PG=PG+1 W !,"Installed Patches for Selected Routines ",UCI,?(IOM-8),"Page: ",PG,!,?60,DATE,!
  1. W "Patch #",?9,"|",$E(LINE,1,29)," Routines ",$E(LINE,1,29),"|",!
  1. Q