Scripts that use this method start with the folloing code fragment.
CallName="$0" # ----- Pickup main roadtech environment ----- Env=$(RTadmin environment 2>/dev/null) if test -z "$Env" then echo "Oops Problem locating config :-" >&2 echo "for $CallName" >&2 exit 2 else RTadmin=$(dirname "$(dirname "$Env")") . "$Env" fi # # ***************************************************************** # |
They will also in most cases use some varient on the folowing three bits.
Check for the global down flag.
if test -r "$flagdir/down.flag"
then
${PRINT} " Very sorry you may not user Roadrunner at present.\n"
cat $flagdir/down.flag
${PRINT} "\n\nPress return to continue."
read get_var
exit 2
fi
|
If the script is going to access Roadrunner. It must make a call to SetDatapathEnv,
after setting a value for DATAPATH and before invoking a program that accesses Roadrunner data.
This will set the DATA SET specific environment.
# ----- Handle DATAPATH specific settings ----- SetDatapathEnv |
Check for set specific down flag.
if test -r "${dsflag}_down"
then
${PRINT} " Very sorry you may not user Roadrunner at present.\n"
cat ${dsflag}_down
${PRINT} "\n\nPress return to continue."
read get_var
exit 2
fi
|
| Var | Exp | Description |
|---|---|---|
| adm | Y | System admin files {/usr/adm, /var/adm, ... } |
| rmlicence | Y | RMcobol licence |
| rmver | Y | RMcobol version |
| rrhome | Y | Directory containing users home directories {/u, /home, .... } |
| sysname | Y | System name got from uname {AIX, UNIX_System_V, ... } |
| sysrel | Y | uname -r |
| sysver | Y | uname -v |
| tmpdir | Y | Application temporary directory. {/tmp, /var/tmp} |
| Variable | Exp | Purpose | Default |
|---|---|---|---|
| RTadmin | N | Path to Admin scripts. rrinst must select install and copy to correct target for machine. | |
| RTadmin_def | N | Default install directory for RoadTech scripts on current platform | /usr/share/rr85/instbits, /usr/share/Roadtech?, /usr/share/RTadmin? |
| RT_Owner | N | User who owns files | rr85 |
| RT_Group | N | Group that uses files | rm85 |
| RT_Cluster | Y | Used to indecate that this server is part of an AIX HACMP Cluster. | FALSE |
| RT_CSPOC | N | PATH fo CSPOC wrapper | |
| RR_ResourceGroup | N | roadrunner |
If it does not exist as you are upgrading from a pre 2003 version, and the option file does not exist. A sample opton file ${RTadmin}/rt.var will be created, when the check configuration option is run from the new scripts.
|
Additional options may be needed if subsystems have been installed at unusual locations.
| RR_Dir | |
| IL_Dir |
| Variable | Exp | Purpose | Default |
|---|---|---|---|
| CallName | N | Path name under which script was started. | |
| ProgName | N | Actual path name of script. | |
| RR_Dir | Y | Roadrunner install dir | /usr/rr85, /usr/share/rr85, /usr/share/roadrunner? |
| RR_DirDef | N | Default install directory for Roadrunner on current platform. | /usr/rr85, /usr/share/rr85, /usr/share/Roadrunner? |
| rrdir | N | Roadrunner install dir Obsolete | |
| flagdir | Y | Flag directory | { $tmpdir/rr_flag, ... } |
| clonedir | Y | Target directory for clone. | {/rrclone} |
| libdir | Y | Source directory for script libraries | $RTadmin/lib |
| lib | Y | Base library. | $libdir/base.lib |
| LPDEST | N | Default printer | lpdest() |
| LogDir | N | ||
| PidDir | N | ||
| WebDir | N | ||
| DATAPATH | Y | Path used to track dataset between sessions | $(<$HOME/.rrdatapath) |
| RR_Prog3 | N | As far as I am aware this has only been used, on programming and support servers. |
|
Thre is no template for this file.
Most are initalized via a call to SetDatapathEnv this function is available to any script, that has loaded setenv.lib.
| Variable | Exp | Purpose | Default |
|---|---|---|---|
| RR_DataPath | N | Path of current dataset | $(<$HOME/.rrdatapath) |
| RR_DataSet | N | Name of curent dataset | read from $rrdir/.datapaths |
| RR_Prog1 | N | Main program directory | $RR_DataPath/cobs |
| RR_Prog2 | N | Update program directory | $RR_DataPath/newcobs |
| RR_ProgDat | N | Program related Data SCREENS, MENUS, etc | $RR_DataPath/instbits |
| dsflag | Y | Flag name for current dataset | $flagdir/$(echo ${RR_DataPath}|tr -A '/' '_') |
| RUNPATH | Y | Search path to programs and program data. | ${RR_ProgDat}:${RR_Prog3}:${RR_Prog2}:${RR_Prog1}:/usr/rmcobol |
| RM_Config | N | RM_Cobol configuration file | -c $RR_DataPath/terminfo.cfg |
| RM_Report | N | RM_Cobol printer configuration | -x $RR_DataPath/report.cfg |
| N | |||
| N |
Some variables may be adjusted on a set by set basis, by the use of the dataset dependent config file. $RR_DataPath/dataset.var
This file is created during the initial install, or when the menus are used to initalize a new dataset.
| Variable | Exp | Purpose | Default |
|---|---|---|---|
| RT_Media | N | Display Media menu | TRUE |
| RT_Print | N | Display print menu | TRUE |
| RT_Mail | N | Display Mail Menu | TRUE |
| MENU | N | rr displays menu of datasets | |
| KILL | N | Kill option from backup | |
| REVEAL | N | Un-hide some options | |
| N |