- ZTPTCH ;557/THM,SFISC/RSD-DISPLAY PATCHES FOR SELECTED ROUTINES ;08/06/97 10:52
- ;;8.0;KERNEL;**44,65**;Jul 10, 1995
- N ZTSK,%ZIS,IOP
- K ^UTILITY($J)
- W !,"Display Patches for Selected Routines",!!
- X ^%ZOSF("RSEL") I '$D(^UTILITY($J)) W !!,*7,"No routines were selected.",!! H 2 G EXIT
- W !! S %ZIS="MQ" D ^%ZIS G:POP EXIT
- I $D(IO("Q")) K IO("Q") S ZTDESC="Installed Patch Listing",ZTRTN="TASK^ZTPTCH",ZTSAVE("^UTILITY($J,")="" D ^%ZTLOAD
- I $D(ZTSK) W !!,"Request queued.",!! G EXIT
- ;
- TASK ;
- N CNT,CNTR,DATE,LINE,PNUM,PG,QUIT,RTN,UCI,X,Y,Z,Z1
- K ^TMP("ZTPTCH",$J)
- W:'$D(ZTQUEUED) !!,"Processing routines..."
- S RTN=0 F S RTN=$O(^UTILITY($J,RTN)) Q:RTN="" D W:'$D(ZTQUEUED) "."
- .S X=$T(+2^@RTN) Q:X="" S Y=$P(X,"**",2)
- .F Z=1:1 S Z1=$P(Y,",",Z) Q:(Z1="") S ^TMP("ZTPTCH",$J,Z1,RTN)=""
- ;
- S U="^" D NOW^%DTC S Y=% D DD^%ZTPP S DATE=Y
- X ^%ZOSF("UCI") S UCI=Y,$P(LINE,"-",IOM)=""
- S (CNT,CNTR,PG,QUIT)=0
- U IO D HDR S PNUM=""
- 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
- .I Z1=0 W PNUM S CNT=CNT+1
- .W ?Z-1#8*10,RTN S CNTR=CNTR+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
- .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
- .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.
- .S Z1=1
- .Q
- W !!?10,"Total Patches = ",CNT," Total Routines = ",CNTR
- I IOST?1"C-".E,'QUIT S X=$$RD(0)
- EXIT K ^UTILITY($J),^TMP("ZTPTCH",$J)
- D ^%ZISC
- Q
- RD(X) ;
- W !!,"Enter RETURN to "_$S(X:"continue or '^' to exit: ",1:"end: ")
- R X:300
- Q ($E(X)="^")
- ;
- HDR I IOST?1"C-".E,PG'=0,'$D(ZTQUEUED),$$RD(1) S QUIT=1 Q
- W:PG>0 @IOF S PG=PG+1 W !,"Installed Patches for Selected Routines ",UCI,?(IOM-8),"Page: ",PG,!,?60,DATE,!
- W "Patch #",?9,"|",$E(LINE,1,29)," Routines ",$E(LINE,1,29),"|",!
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HZTPTCH 2001 printed Dec 13, 2024@02:16:35 Page 2
- ZTPTCH ;557/THM,SFISC/RSD-DISPLAY PATCHES FOR SELECTED ROUTINES ;08/06/97 10:52
- +1 ;;8.0;KERNEL;**44,65**;Jul 10, 1995
- +2 NEW ZTSK,%ZIS,IOP
- +3 KILL ^UTILITY($JOB)
- +4 WRITE !,"Display Patches for Selected Routines",!!
- +5 XECUTE ^%ZOSF("RSEL")
- IF '$DATA(^UTILITY($JOB))
- WRITE !!,*7,"No routines were selected.",!!
- HANG 2
- GOTO EXIT
- +6 WRITE !!
- SET %ZIS="MQ"
- DO ^%ZIS
- if POP
- GOTO EXIT
- +7 IF $DATA(IO("Q"))
- KILL IO("Q")
- SET ZTDESC="Installed Patch Listing"
- SET ZTRTN="TASK^ZTPTCH"
- SET ZTSAVE("^UTILITY($J,")=""
- DO ^%ZTLOAD
- +8 IF $DATA(ZTSK)
- WRITE !!,"Request queued.",!!
- GOTO EXIT
- +9 ;
- TASK ;
- +1 NEW CNT,CNTR,DATE,LINE,PNUM,PG,QUIT,RTN,UCI,X,Y,Z,Z1
- +2 KILL ^TMP("ZTPTCH",$JOB)
- +3 if '$DATA(ZTQUEUED)
- WRITE !!,"Processing routines..."
- +4 SET RTN=0
- FOR
- SET RTN=$ORDER(^UTILITY($JOB,RTN))
- if RTN=""
- QUIT
- Begin DoDot:1
- +5 SET X=$TEXT(+2^@RTN)
- if X=""
- QUIT
- SET Y=$PIECE(X,"**",2)
- +6 FOR Z=1:1
- SET Z1=$PIECE(Y,",",Z)
- if (Z1="")
- QUIT
- SET ^TMP("ZTPTCH",$JOB,Z1,RTN)=""
- End DoDot:1
- if '$DATA(ZTQUEUED)
- WRITE "."
- +7 ;
- +8 SET U="^"
- DO NOW^%DTC
- SET Y=%
- DO DD^%ZTPP
- SET DATE=Y
- +9 XECUTE ^%ZOSF("UCI")
- SET UCI=Y
- SET $PIECE(LINE,"-",IOM)=""
- +10 SET (CNT,CNTR,PG,QUIT)=0
- +11 USE IO
- DO HDR
- SET PNUM=""
- +12 FOR
- SET PNUM=$ORDER(^TMP("ZTPTCH",$JOB,PNUM))
- if PNUM=""!QUIT
- QUIT
- WRITE !!
- SET RTN=""
- SET Z1=0
- FOR Z=2:1
- SET RTN=$ORDER(^TMP("ZTPTCH",$JOB,PNUM,RTN))
- if RTN=""
- QUIT
- Begin DoDot:1
- +13 IF Z1=0
- WRITE PNUM
- SET CNT=CNT+1
- +14 WRITE ?Z-1#8*10,RTN
- SET CNTR=CNTR+1
- +15 ;end of line
- IF (Z#8)=0
- IF $ORDER(^TMP("ZTPTCH",$JOB,PNUM,RTN))]""
- if $Y>(IOSL-6)
- DO HDR
- SET Z=1
- WRITE !?Z-1#8*10
- +16 ;end of page, more of same patch
- IF $Y>(IOSL-6)
- IF (Z#8)=0
- IF $ORDER(^TMP("ZTPTCH",$JOB,PNUM,RTN))]""
- DO HDR
- SET Z=1
- WRITE !?Z-1#8*10
- +17 ;end of page, no more on same patch.
- IF $Y>(IOSL-6)
- IF $ORDER(^TMP("ZTPTCH",$JOB,PNUM,RTN))=""
- DO HDR
- SET Z=1
- WRITE !?Z-1#8*10
- +18 SET Z1=1
- +19 QUIT
- End DoDot:1
- if QUIT
- QUIT
- +20 WRITE !!?10,"Total Patches = ",CNT," Total Routines = ",CNTR
- +21 IF IOST?1"C-".E
- IF 'QUIT
- SET X=$$RD(0)
- EXIT KILL ^UTILITY($JOB),^TMP("ZTPTCH",$JOB)
- +1 DO ^%ZISC
- +2 QUIT
- RD(X) ;
- +1 WRITE !!,"Enter RETURN to "_$SELECT(X:"continue or '^' to exit: ",1:"end: ")
- +2 READ X:300
- +3 QUIT ($EXTRACT(X)="^")
- +4 ;
- HDR IF IOST?1"C-".E
- IF PG'=0
- IF '$DATA(ZTQUEUED)
- IF $$RD(1)
- SET QUIT=1
- QUIT
- +1 if PG>0
- WRITE @IOF
- SET PG=PG+1
- WRITE !,"Installed Patches for Selected Routines ",UCI,?(IOM-8),"Page: ",PG,!,?60,DATE,!
- +2 WRITE "Patch #",?9,"|",$EXTRACT(LINE,1,29)," Routines ",$EXTRACT(LINE,1,29),"|",!
- +3 QUIT