Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Info |  Source |  Entry Points |  Interaction Calls
Print Page as PDF
Routine: LRUTIL

Package: Lab Service

Routine: LRUTIL


Information

LRUTIL ;DALOI/JDB -- Lab Utilities ;Aug 15, 2008

Source Information

Source file <LRUTIL.m>

Entry Points

Name Comments DBIA/ICR reference
SELECT(DIC,OUT,FNAME,SELS,SORT,NOALL,MODE) ;
; convenience method
; Package replacement for FIRST^VAUTOMA
; Allows user to select multiple entries from a file.
GETLOCK(ZZZZTARG,ZZZZSECS,ZZZZSHOW) ;
; Acquire a Lock on the specified resource.
; Note: "ZZZ*" variable names used to avoid possible variable
; name clashes with @TARG -- "^GBL(1,X)" N X then @TARG would
; change the intended resource for lock since X would be different.
; Inputs
; TARG : The Resource to Lock (ie "^GBL(1)")
; SECS : Total # of seconds to wait for the lock
; : (Minimum value is 5 seconds)
; : Negative value means one solid wait (no breaks)
; SHOW : >0:show progress, 0:dont show progress
; : 1:dots 2:countdown 3: timeleft+dots
; Output
; 1 if lock obtained, 0 if not.
; If SHOW>0 API outputs progress info
QUE(ZTRTN,ZTDESC,ZTSAVE,NOQUE,QUIET) ;
; Prompts for Device and allows queueing a routine
; Inputs
; ZTRTN :
; ZTDESC :
; ZTSAVE : <byref>
; NOQUE : 1=no queue 0=allow queue
; Outputs
; Returns -1 if POP=1, 0 if not queued, or the QUEUED task #
TASK(ZTRTN,ZTDESC,ZTSAVE,QUIET,ZTDTH,ZTIO) ;
; Tasks the specified routine
; Returns the task # or 0
; ZTSAVE:<byref>
ISQUIET() ;
; Is "Quiet" or not (Should we Write output?)
RDELTSK(LRDELRTN,ZTDESC,ZTDTH) ;
; Delete routines via a tasked job it creates
; Inputs
; LRDELRTN: <byref> Array that holds the routines to delete
; ZTDESC: <opt> Description to use for tasked job
; ZTDTH: <opt> Date/Time (in $H) for job to run
; Outputs
; The task number
DELRTNS(RTNS,USELRDEL) ;
; Delete routines
; Useful for deleting routines via TaskMan
; For easier use with TaskMan, the LRDELRTN array can also be
; setup prior to calling with TaskMan to delete multiple routines.
; Inputs
; RTNS : <byref> The routine(s) to delete
; : RTNS="rtn" or RTNS("rtn")="" or RTNS(#)=rtn
; USELRDEL : 1=use LRDELRTN array 0=dont use
; : Setup array LRDELRTN(rtn) or LRDELRTN(#)=rtn
; : and then call.
; LRDELRTN : <symtbl><opt> Array of routines to delete
NP(ABORT,PGDATA) ;
; Next Page Handler
; Generic display utility. Prints HDR and FTR when needed.
; Caller should check ABORT and terminate when 1.
; Caller needs to make initial call to their HDR code
; and to call their FTR code at end if needed.
; Note: Header code should place cursor on start
; of newline when done.
; Inputs
; ABORT : <byref> Equals 1 if user enters "^" at "MORE" prompt
; PGDATA : <byref> Page Data array
; : "PGNUM": current page number
; : "BM": Bottom Margin (# of lines in footer)
; : "HDR": Executable M code for header
; : "FTR": Executable M code for footer
; : "NOPROMPT": Dont show "more" prompt (0 or 1) <dflt=0>
; : "PROMPT": (string) Replacement for "More" prompt
; : "PROMPTX": Executable M code to run for "More" prompt
; : The M Code must set var X equal to the prompt to use.
; : "WFTR": the footer was written (=1)
; : "ERASE": Erase MORE prompt (1=Erase 0=Dont erase dflt=1)
; : "IOF": <opt>IOF control.
; : IOF=0: IOF not issued for non "C-" type devices.
; : IOF=1: IOF issued for "C-" type devices.
MORE(PROMPT,ERASE) ;
; Prompts user to hit ENTER to continue
; Returns 1 if user enters "^" else returns 0
DATAOK(LRFILE,LRFLD,LRVAL) ;
; Checks if a value is appropriate for storing in the field
; Inputs
; LRFILE : File #
; LRFLD : Field #
; LRVAL : Value of the field
OWNSKEY(KEY,IEN) ;

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: " ",ZZZTRIES-1*ZZZZZZTO
  • Condition for execution: ZZZZZZZI=1
  • Line Location: GETLOCK+30
Function Call: WRITE
  • Prompt: "."
  • Line Location: GETLOCK+30
Function Call: WRITE
  • Prompt: " ",(ZZZTRIES-ZZZZZZZI)*ZZZZZZTO
  • Line Location: GETLOCK+31
Function Call: WRITE
  • Prompt: "."
  • Line Location: GETLOCK+32
Function Call: WRITE
  • Prompt: !,"Request "_$S($G(ZTSK):"queued - Task #"_ZTSK,1:"NOT queued")
  • Line Location: TASK+7
Function Call: WRITE
  • Prompt: !
  • Line Location: NP+37
Function Call: WRITE
  • Prompt: @IOF
  • Line Location: NP+66
Function Call: WRITE
  • Prompt: @IOF
  • Line Location: NP+68
Function Call: WRITE
  • Prompt: $C(13)_$J("",$G(IOM,80))_$C(13)
  • Line Location: MORE+11
Info |  Source |  Entry Points |  Interaction Calls