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: XUXTADASK1

Package: Kernel

Routine: XUXTADASK1


Information

XUXTADASK1 ;ESL/JAC/CM - UTL Reusable prompting subroutines #1 ; 06/26/2020@9:30

Source Information

Source file <XUXTADASK1.m>

Entry Points

Name Comments DBIA/ICR reference
CENTER(AXUXTADTEXT,AXUXTADLF,AXUXTADRM,AXUXTADRVIDEO)
FMDIR
ASKLIST(XUXTADOUTPUT,XUXTADINPUT,XUXTADMAXNUM,XUXTADDEF) ; Prompt the user to 'Select NUMBER(S): '.
; The XUXTADOUTPUT and INPUT parameters must be passed by reference and are
; limited to local un-subscripted arrays. Each of the local array variable
; names must be prefixed in the actual parameter list of the calling routine's
; DO command with a period. See the example provided below which was provided
; as a reference.
ASKNUM(XUXTADMAXNUM,XUXTADDEF,XUXTADPROMPT,XUXTADLINFED) ; Extrinsic to prompt from 1 to XUXTADMAXNUM
; Input:
; XUXTADMAXNUM Optional - Maximum number of input choices
; XUXTADDEF Optional - Default response (if user hits <Enter> key)
; XUXTADPROMPT Optional - Input prompt text, for example:
; "How many days? 90//" ; when XUXTADDEF = 90
; XUXTADLINFED Optional - Number of linefeeds before prompting user
; (defaults to 1, if not passed)
; Output:
; User's response (Usually an integer, could be '^' or null)
; Note: The calling routine should check for '^' response.
ASKNUM1 ; Return to this label upon receiving an incorrect response
ASKPKG(XUXTADPROMPT) ; Prompt for 2-7 character Package NAMESPACE
; Input:
; XUXTADPROMPT Optional - Text for input prompt - for example: "Enter NAMESPACE: "
; Output:
; XUXTADPKG Chosen namespace (2 to 7 characters)
; XUXTADQUIT 0 - If a successful package namespace was entered.
; 1 - If prompt times out; user enters an '^' or the user simply hits
; <Enter> without answering.
ASKPKG1 ; Return to this label upon receiving an incorrect response
ASKYESNO(XUXTADPROMPT,XUXTADDEF) ; Extrinsic, prompt for YES, NO response
; Input:
; XUXTADPROMPT Optional - Text of prompt....input to DIR("A")
; XUXTADDEF Optional - Default response..input to DIR("B")
; will be "NO" if not passed on input
; Output: Y (for YES), N (for NO), or '^"
; Intended use:
; This API call was developed as a standardized wrapper call
; to the FM DIR utility when a YES or NO response is required.
; Note: The calling routine will be responsible for checking for a
; '^' response as shown in the example calls below.
ERRMSG1 ; Package NAMESPACE requirements were NOT met.
ERRMSG2 ; <CAPS LOCK> key if not on.
GETKEYWD(XUXTADMINLEN,XUXTADMAXLEN) ; Prompt for KEYWORD
; Input:
; XUXTADMINLEN Required - Minimum length of KEYWORD specification
; XUXTADMAXLEN Required - Maximum length of KEYWORD specification
; XUXTADKEYWRD Required - externally defined, returned to caller.
; Output:
; XUXTADKEYWRD Keyword to be used later for screening output records
; (or user's response which could be null or "^")
; XUXTADQUIT 0 - Keyword successfully chosen
; 1 - User entered '^' or no keyword was chosen
GETKEY1 ; Return to this label upon receiving an incorrect response
GETSORT(XUXTADRTN,XUXTADINPUT,XUXTADDEF) ; Get sorting criteria (generic subroutine call)
; Input:
; XUXTADRTN..... ; Required - Name of calling routine, typically $T(+0)
; XUXTADINPUT(n)=Sorting_Option - Required
; Where XUXTADINPUT represents the name of the input array, and n is a
; consecutive integer from 1 to the (n)umber of sorting options presented
; The input array name is passed by reference and any local array
; name can be used, although passing '.XUXTADSORT' is preferred
; which then allows the calling routine to utilize the user
; selected sorting option to be referenced as XUXTADSORT(XUXTADSORT).
; This also minimizes the number of variables that would have to
; be NEWed by the calling routine.
; XUXTADDEF Optional - Default integer response to prompt.
; Defaults to 1 if not passed
; If XUXTADDEF is passed and XUXTADINPUT(XUXTADDEF) exists, then XUXTADDEF
; becomes the default integer response allowing the
; developer to always override other previous default responses.
; Output:
; XUXTADSORT Integer representing user's sorting choice
; XUXTADQUIT Set to 1 if the user up-arrows out, otherwise 0.
USRLIMIT(XUXTADRTN) ; Include (active users, inactive users, or both active and inactive users)
; Output:
; XUXTADULIMIT 1 for both active & inactive users
; 2 for active users
; 3 for inactive users
; XUXTADQUIT 0 - for successful selection at prompt
; 1 - if user enters an '^' to exit at prompt
; Input:
; XUXTADRTN Required - Name of calling routine; usually $T(+0)

Interaction Calls

Name Line Occurrences
Function Call: WRITE
  • Prompt: !
  • Line Location: ASKNUM+18
Function Call: WRITE
  • Prompt: XUXTADPROMPT
  • Line Location: ASKNUM1+1
Function Call: WRITE
  • Prompt: XUXTADDEF_"// "
  • Line Location: ASKNUM1+1
Function Call: READ
  • Variable: XUXTADRESPONSE
  • Timeout: DTIME
  • Line Location: ASKNUM1+2
Function Call: WRITE
  • Prompt: $C(7)," Enter a number from 1 to "_$FN(XUXTADMAXNUM,",")_" or '^' to exit."
  • Line Location: ASKNUM1+9
Function Call: WRITE
  • Prompt: !
  • Line Location: ASKNUM1+10
Function Call: WRITE
  • Prompt: $C(7)," Enter a positive integer (1, 2, etc.); or '^' to exit."
  • Line Location: ASKNUM1+11
Function Call: WRITE
  • Prompt: !
  • Line Location: ASKNUM1+12
Function Call: WRITE
  • Prompt: !!,XUXTADPROMPT
  • Line Location: ASKPKG1+7
Function Call: READ
  • Variable: XUXTADPKG
  • Timeout: DTIME
  • Line Location: ASKPKG1+9
Function Call: WRITE
  • Prompt: " ??"
  • Line Location: ERRMSG1+1
Function Call: WRITE
  • Prompt: !!?6,"Enter the first 2 to 7 characters of the Package NAMESPACE, or"
  • Line Location: ERRMSG1+2
Function Call: WRITE
  • Prompt: !?6,"enter an '^' to exit."
  • Line Location: ERRMSG1+3
Function Call: WRITE
  • Prompt: !!?6,"The first character must be an alphabetic or % character, followed by"
  • Line Location: ERRMSG1+4
Function Call: WRITE
  • Prompt: !?6,"any alphanumeric combination, however, all alphabetic characters"
  • Line Location: ERRMSG1+5
Function Call: WRITE
  • Prompt: !?6,"must be in uppercase with no lowercase characters allowed."
  • Line Location: ERRMSG1+6
Function Call: WRITE
  • Prompt: !
  • Line Location: GETKEYWD+12
Function Call: WRITE
  • Prompt: !,"Select a KEYWORD (from "_XUXTADMINLEN_" to "_XUXTADMAXLEN_" characters): "
  • Line Location: GETKEY1+2
Function Call: READ
  • Variable: XUXTADKEYWRD
  • Timeout: DTIME
  • Line Location: GETKEY1+5
Function Call: WRITE
  • Prompt: " ??"
  • Line Location: GETKEY1+8
Function Call: WRITE
  • Prompt: !!,"Sort by"
  • Line Location: GETSORT+29
Function Call: WRITE
  • Prompt: !?XUXTADPOS,$J(XUXTADCNT,2),") ",XUXTADINPUT(XUXTADCNT)
  • Line Location: GETSORT+32
Function Call: WRITE
  • Prompt: !!,"Include"
  • Line Location: USRLIMIT+14
Function Call: WRITE
  • Prompt: !?4,"1) Both active and inactive users"
  • Line Location: USRLIMIT+15
Function Call: WRITE
  • Prompt: !?4,"2) Only active users"
  • Line Location: USRLIMIT+16
Function Call: WRITE
  • Prompt: !?4,"3) Only inactive users"
  • Line Location: USRLIMIT+17
Info |  Source |  Entry Points |  Interaction Calls