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

AURSIZ.m

Go to the documentation of this file.
  1. AURSIZ ; IHS/TUC-BRJ List routine names and sizes w/overall total. [ 02/26/86 12:13 PM ]
  1. W !!,"%AURSIZ - List routine names and sizes",!
  1. K ^UTILITY($J) D ^%RSEL G EXIT:$N(^UTILITY($J,0))<0
  1. SELD ;
  1. S $ZT="",IOO=$I,%DEF=$I D ^%IOS G EXIT:'$D(%IOD) I %IOD>46&(%IOD<64) C %IOD K %IOD,%DTY,%P W *7,!!,"Please select only terminal or printer devices!! Thanks... %AURSIZ!!",! G SELD
  1. S %IO=%IOD
  1. WAIT ;
  1. R !,"Do you want to free up this terminal? <N> ",WAIT G:'((WAIT?1"N")!(WAIT?1"Y")!(WAIT="")!(WAIT="?")) WAIT
  1. S:WAIT="" WAIT="N"
  1. I WAIT="?" W !!,"It may take some time to accumulate all the routine size values.",!,"This is dependent on how many routines you selected.",!!,"Enter ""Y"" to exit this job. Otherwise enter ""N"" or <CR> to continue." G WAIT
  1. I WAIT="Y"&(IOO=%IOD) W !!,"Sorry....Can't free device since output device is this terminal." S WAIT=""
  1. DET ;
  1. I WAIT="Y" W !!,"Closing this device. Hit <CR> for logon prompt. B y e...",!!,"Exit",!! C $I,%IO
  1. E W !!,"Please wait..."
  1. S %JB=$J
  1. A1 ;
  1. I $D(^UTILITY("CRF",%JB))!$D(^UTILITY("CRF1",%JB)) S %JB=%JB+100 G A1
  1. K ^UTILITY("CRF",%JB),^UTILITY("CRF1",%JB),(%JB,IOO,%IO,%DTY) S (A,%R)=0
  1. X "F I=1:1 S A=$N(^UTILITY($J,A)),T=0 Q:A<0 ZL @A S %R=%R+1 F J=1:1 S ^UTILITY(""CRF"",%JB,I,J)=$T(+J),T=T+$L($T(+J)) I $T(+J+1)="""" S ^UTILITY(""CRF1"",%JB,I,0)=A_""^""_T Q"
  1. PRT ;
  1. O %IO U %IO W:IOO'=%IO # S SIZT=0
  1. I '$D(UCI)!'$D(SYS) D ^%GUCI S UCI=%UCI,SYS=%SYS
  1. W !!,?13,"%AURSIZ - LIST ROUTINE SIZES ",?45 D ^%D W !,?25,"of ",UCI,",",SYS,?45 D ^%T W !!,?24,"ROUTINE",?36,"SIZE",!
  1. F %I=1:1 Q:'$D(^UTILITY("CRF1",%JB,%I,0)) S Y=^(0),NAM=$P(Y,"^",1),SIZ=$P(Y,"^",2) W !?24,NAM,?34,$J(SIZ,6) S SIZT=SIZT+SIZ
  1. W !!,?24,"TOTAL",?34,$J(SIZT,6)
  1. W !!,?24,%I-1," ROUTINE" W:%I-1>1 "S"
  1. K ^UTILITY("CRF",%JB),^UTILITY("CRF1",%JB),%JB,%I,HEAD,I,J,N,NAM,S,SIZ,SIZT,T,TRM,V,W,X,Y,Z
  1. EXIT ;
  1. S $ZT="" K ^UTILITY("CRF",$J),%DT,%R,A,I,IOM,X,%I9,%L9,%MS,%NX,%PF,%ST,%T8,%TM,%TR,%UCI,%UCN,ERA,FIG,LC,%CH,%CP,%DTY,%FS,%SYS,SYS,UCI,WAIT
  1. I $D(%IO),%IO,IOO'=%IO W # C %IO
  1. K IOO,%IO
  1. Q