#!/bin/bash
# VAVistADemo

export gtm_dist="/home/vista/VAVistADemo/ast/gtm_V5.2-000/gtm"

# gtmgbldir - identifies the Global Directory to be used. A Global Directory maps global variables
# to physical database files, and is required to access M global variables. If you maintain multiple
# Global Directories, you must choose one to use. To automate this definition, define gtmgbldir in
# your login file. 
export gtmgbldir="/home/vista/VAVistADemo/ast/gtm_V5.2-000/g/mumps.gld"

# gtm_log - the directory where the gtm_secshr_log file is stored. The gtm_secshr_log file stores
# information gathered in the gtmsechr process. Sanchez Computer Associates recommends that
# a system-wide default be established for gtm_log so that gtmsecshr always logs its information
# in the same directory, regardless of which user’s GT.M process invokes gtmsechr. 
export gtm_log="/home/vista/VAVistADemo/ast/gtm_V5.2-000/gtm/log"

# gtm_vista - specifies the directory in which the OpenVista routines and globals are located. 
export gtm_vista="/home/vista/VAVistADemo/ast/gtm_V5.2-000/gtm"

export vista_home="/home/vista/VAVistADemo/ast/gtm_V5.2-000"
export gtm_principal="/home/vista/VAVistADemo/ast/gtm_V5.2-000/gtm"

# gtmroutines - directory search list of possible locations for M routines. This search enables
# GT.M to find the routine (program) you want to run even if it is not in your current working
# directory. Sanchez Computer Associates recommends the inclusion of $gtm_dist in the list
# of directories specified in gtmroutines. This permits access to the Global Directory Editor
# (GDE) and to utility routines supplied with GT.M. 
export gtmroutines="$vista_home/o($vista_home/r) $gtm_dist"

alias GTM="$gtm_dist/mumps -direct"
alias gtm="$gtm_dist/mumps -direct"
alias mupip="$gtm_dist/mupip"
alias gde="$gtm_dist/mumps -r ^GDE"
alias lke="$gtm_dist/lke"
alias dse="$gtm_dist/dse"
alias rundown="$gtm_dist/mupip rundown -r \"*\""
export PATH=$PATH:$gtm_dist

echo "VistA parameters are set."

