XBRLL ; IHS/ADC/GTH - LIST ROUTINE LINES WITH LENGTHS ; [ 02/07/97 3:02 PM ]
;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
;
; This routine lists a single routine line by line noting
; the length of the line plus the cumulative character count.
;
START ;
NEW DIF,X,XCNP
S X=$$DIR^XBDIR("FO^1:8","Enter routine name")
Q:$D(DIRUT)
X ^%ZOSF("TEST")
Q:'$T
KILL ^TMP("XBRLL",$J)
S DIF="^TMP(""XBRLL"",$J,",XCNP=0
X ^%ZOSF("LOAD")
D ^%ZIS
Q:POP
U IO
W !!,"....[LINE NUMBER/LENGTH OF THIS LINE/CUMULATIVE NUMBER OF CHARACTERS]",!!
S (%2,%1)=0
F %I=1:1 S %X=$G(^TMP("XBRLL",$J,%I,0)) Q:%X="" W ! S %Y=$P(%X," "),%Z=$E(%X,$L(%Y)+2,255),%2=%2+$L(%X)+2,%1=$S(%Y="":%1+1,1:0) S:%1>0 %Y=" +"_%1 S %Y=%Y_$J("",8-$L(%Y)) W %Y," ",%Z," [+",%I,"/",$L(%X),"/",%2,"]"
KILL %1,%2,%N,%X,%Y,%Z,%I
W !!
KILL DIRUT,DTOUT,DUOUT,I,Y
D ^%ZISC
Q
;
XBRLL ; IHS/ADC/GTH - LIST ROUTINE LINES WITH LENGTHS ; [ 02/07/97 3:02 PM ]
+1 ;;3.0;IHS/VA UTILITIES;;FEB 07, 1997
+2 ;
+3 ; This routine lists a single routine line by line noting
+4 ; the length of the line plus the cumulative character count.
+5 ;
START ;
+1 NEW DIF,X,XCNP
+2 SET X=$$DIR^XBDIR("FO^1:8","Enter routine name")
+3 IF $DATA(DIRUT)
QUIT
+4 XECUTE ^%ZOSF("TEST")
+5 IF '$TEST
QUIT
+6 KILL ^TMP("XBRLL",$JOB)
+7 SET DIF="^TMP(""XBRLL"",$J,"
SET XCNP=0
+8 XECUTE ^%ZOSF("LOAD")
+9 DO ^%ZIS
+10 IF POP
QUIT
+11 USE IO
+12 WRITE !!,"....[LINE NUMBER/LENGTH OF THIS LINE/CUMULATIVE NUMBER OF CHARACTERS]",!!
+13 SET (%2,%1)=0
+14 FOR %I=1:1
SET %X=$GET(^TMP("XBRLL",$JOB,%I,0))
IF %X=""
QUIT
WRITE !
SET %Y=$PIECE(%X," ")
SET %Z=$EXTRACT(%X,$LENGTH(%Y)+2,255)
SET %2=%2+$LENGTH(%X)+2
SET %1=$SELECT(%Y="":%1+1,1:0)
IF %1>0
SET %Y=" +"_%1
SET %Y=%Y_$JUSTIFY("",8-$LENGTH(%Y))
WRITE %Y," ",%Z," [+",%I,"/",$LENGTH(%X),"/",%2,"]"
+15 KILL %1,%2,%N,%X,%Y,%Z,%I
+16 WRITE !!
+17 KILL DIRUT,DTOUT,DUOUT,I,Y
+18 DO ^%ZISC
+19 QUIT
+20 ;