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

DBARO.m

Go to the documentation of this file.
  1. DBARO ; Routine Method for Standard Extraction of Routines ;9/23/06 14:10
  1. N EXIT,ODIR,OFN,RTN
  1. I '$D(DTIME) N DTIME S DTIME=300
  1. ; Routine Selector
  1. X ^%ZOSF("RSEL")
  1. ;Output in ^UTILITY($J,rtn)
  1. S RTN=$O(^UTILITY($J,9)),EXIT=0 ;
  1. D:$L(RTN)
  1. . F D IFILE Q:$L($G(IO))
  1. . D:$L($G(IO))&('EXIT)
  1. . . U $P
  1. . . W !,"Enter a Comment for the Routine Set.",!
  1. . . R ">>",COM:DTIME,!
  1. . . I '$T!($E(ODIR)="^") S EXIT=1 Q
  1. . . ;
  1. . . U IO
  1. . . W COM,!,$$HTE^XLFDT($H),!
  1. . . D RGET
  1. . . U $P
  1. . .QUIT
  1. .QUIT
  1. QUIT
  1. ; ==============
  1. IFILE ; Prompt and accept the Directory and File Combination
  1. N X
  1. W !,"Enter a valid directory path and file name for the receiving file"
  1. W !," enter '?' for Help, or '^' to exit now."
  1. W !," such as: /tmp/ and OUTRTNS.RO",!
  1. R !,"Directory > ",ODIR:DTIME,!
  1. I ('$T)!($E(ODIR)="^") S EXIT=1 Q
  1. R !,"Output File > ",OFNM:DTIME,!
  1. I ('$T)!($E(OFNM)="^") S EXIT=1 Q
  1. D OPEN^%ZISH("",ODIR,OFNM,"W") U $P
  1. QUIT
  1. ; ==============
  1. RGET ; The file and the list of routines has been selected,
  1. ; now go load the File.
  1. N XCNP,DIF,TMP,X,I,L,S,V
  1. I '$D(IORM) N IORM S IORM=255
  1. S S=$J("",12)
  1. ; RTN already has the first name.
  1. F D S RTN=$O(^UTILITY($J,RTN)) Q:RTN=""
  1. . K TMP S XCNP=0,DIF="TMP(",X=RTN X ^%ZOSF("LOAD")
  1. . U IO W RTN,!
  1. . F I=1:1:XCNP-1 W TMP(I,0),!
  1. . W !
  1. . U $P W:(($X+10)>80) ! W $E(RTN_S,1,10)
  1. . Q
  1. U IO
  1. W !!
  1. F I=1:1:5 W "#########",!
  1. I IOT="HFS" D ^%ZISC
  1. QUIT
  1. ; ==============