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

AURSRCH3.m

Go to the documentation of this file.
AURSRCH3 ; SEARCH OUTPUT TRANSFORM FOR ROUTINES [ 04/06/88  8:39 AM ]
 ; PREVIOUSLY NAMED AUSOUT
 ;
 W !!,"This routine searches a file for OUTPUT TRANSFORMS that call routines.",!
 S U="^"
 S DIC="^DIC(",DIC(0)="AEMQ" D ^DIC
 I Y<0 D EOJ Q
 S AUSOUT("FILE")=+Y
 K ^UTILITY("AURSRCH",$J)
 S AUSOUT("MASTER")=""
EN ; ENTRY POINT FOR CALLING ROUTINES
 S AUSOUT("LAST FILE")=""
 D SBTRACE
 D:$D(AUSOUT("MASTER")) LIST
 D EOJ
 Q
SBTRACE ; CHECK ALL SUB-FILES
 K AUSOUTFL S AUSOUT("CNT")=1,AUSOUTFL(AUSOUT("CNT"))=AUSOUT("FILE")
 F AUSOUT("L")=0:0 S AUSOUT("LCTL")=$O(AUSOUTFL("")) Q:AUSOUT("LCTL")=""  S AUSOUT("FILE")=AUSOUTFL(AUSOUT("LCTL")) D SBTRACE2 S AUSOUT("LCTL")=$O(AUSOUTFL("")) D FILE K AUSOUTFL(AUSOUT("LCTL"))
 Q
SBTRACE2 ;
 S AUSOUT("LCTL")=0 F AUSOUT("L")=0:0 S AUSOUT("LCTL")=$O(^DD(AUSOUT("FILE"),"SB",AUSOUT("LCTL"))) Q:AUSOUT("LCTL")=""  S AUSOUT("CNT")=AUSOUT("CNT")+1,AUSOUTFL(AUSOUT("CNT"))=AUSOUT("LCTL")
 Q
 ;
FILE ; CHECK ONE FILE OR SUB-FILE
 S AUSOUT("FIELD")=0
 F AUSOUT("L")=0:0 S AUSOUT("FIELD")=$O(^DD(AUSOUT("FILE"),AUSOUT("FIELD"))) Q:AUSOUT("FIELD")'=+AUSOUT("FIELD")  D FIELD
 Q
 ;
FIELD ; CHECK FIELD'S INPUT TRANSFORM
 Q:'$D(^DD(AUSOUT("FILE"),AUSOUT("FIELD"),2))
 S X=^(2)
 Q:X'[U
 S AURSRCH("FOUND")=0,AUSOUT("COUNT")=$L(X,U)
 F AUSOUT("I")=AUSOUT("COUNT"):-1:2 S Y=$P(X,U,AUSOUT("I")) D ^AURSRCH1
 D:AURSRCH("FOUND") WRITE
 Q
 ;
WRITE ;
 I $D(AURSRCH("NO DETAIL")) W "." Q
 I AUSOUT("FILE")'=AUSOUT("LAST FILE") S AUSOUT("LAST FILE")=AUSOUT("FILE") W !
 W !,AUSOUT("FILE"),",",AUSOUT("FIELD"),?20,$E(X,1,59)
 F AUSOUT("L")=0:0 S X=$E(X,60,999) Q:X=""  W !,?20,$E(X,1,59)
 Q
 ;
LIST ; LIST ROUTINE NAMES
 Q:'$D(^UTILITY("AURSRCH",$J))
 W !!,"Sorted list of routines found:",!
 S X="" F AUSOUT("L")=0:0 S X=$O(^UTILITY("AURSRCH",$J,X)) Q:X=""  W !,"^",X
 K ^UTILITY("AURSRCH",$J)
 W !
 Q
 ;
EOJ ;
 K DIC
 K X,X0,X1,X2,Y,YY
 K:$D(AUSOUT("MASTER")) AURSRCH
 K AUSOUT,AUSOUTFL
 Q