Environment variables set or used by Roadtech scripts.

The Road Tech Administrative Tollkit makes extensive use of environment variables.

Environment variables general.

The following tables document the main variables used in the scripts, and the "Exp" column notes which ones are exported for the benefit of called programs.

System details

These variables hold details relating to the local system. Set when setenv.lib scans the host system to identify the platform.

VarExpDescriptiondefault
sysnameYSystem name {AIX, UNIX_System_V, ... }
sysverYVersionuname -v
sysrelYReleasededuced from uname -r
syskernYRunning kernelN/A
hostnameYN/A
admYSystem admin files {/usr/adm, /var/adm, ... }N/A
rmverYRMcobol versionN/A
rmlicenceYRMcobol licenceN/A
rrhomeYDirectory containing users home directories {/u, /home, .... }
tmpdirYApplication temporary directory. {/tmp, /var/tmp}
SENDMAILYN/A
SENDMAIL_MSAYN/A
PRINTYN/A
PAGEYN/A
PATHYN/A
YN/A
YN/A

User

Set by the system for a user. Valid for AIX and Linux.

VarExpDescription
HOMEYUsers home directory.
LOGNAMEYIdentifier used to identify the user to the operating system.
TERMYUsers terminal type.

Roadtech administrative scripts

There are a number of variables that affect the behaviour of the administrative scripts. These are initialized by setenv.lib when it scans the system.

RTadmin is set to the PATH of the base directory containing the administrative programs. Most paths used to locate other items are found relative to this.

Most of the current values are displayed as part of the "Show configuration" option on the System Menu.

VariableExpPurposeDefault
RTadminNPath to Admin scripts.
rrinst must select install and copy to correct target for machine.
 
RTadmin_defNDefault install directory for RoadTech scripts on current platform/usr/share/rr85/instbits,
/usr/share/Roadtech?,
/usr/share/RTadmin?
RT_OwnerNUser who owns filesrr85
RT_GroupNGroup that uses filesrm85
RT_MediaNDisplay Media menuTRUE
RT_PrintNDisplay print menuTRUE
RT_MailNDisplay Mail MenuTRUE
RT_ClusterYUsed to indecate that this server is part of an AIX HACMP Cluster.FALSE
RT_CSPOCNPATH to CSPOC wrapper. AIX HACMP only. 
RR_ResourceGroupN roadrunner
MENUNrr displays menu of datasets 
KILLNKill option from backup 
REVEALNUn-hide some options 

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.


# Roadtech variable initialization
# RT_Owner=${RT_Owner}
# RT_Group=${RT_Group}
# RT_EdiGroup=${RT_EdiGroup}

Additional options may be needed if subsystems have been installed at unusual locations.

RR_Dir
IL_Dir

Environment variables roadrunner

These may be split between global and dataset specific.

Roadrunner General

VariableExpPurposeDefault
CallNameNPath name under which script was started. 
ProgNameNActual path name of script. 
RR_DirYRoadrunner install dir /usr/rr85, /usr/share/rr85, /usr/share/roadrunner?
RR_DirDefNDefault install directory for Roadrunner on current platform./usr/rr85, /usr/share/rr85, /usr/share/Roadrunner?
rrdirNRoadrunner install dir Obsolete 
flagdirYFlag directory { $tmpdir/rr_flag, ... }
clonedirYTarget directory for clone.{/rrclone}
libdirYSource directory for script libraries$RTadmin/lib
libYBase library.$libdir/base.lib
LPDESTNDefault printerlpdest()
LogDirN  
PidDirN  
WebDirN  
DATAPATHYPath used to track dataset between sessions$(<$HOME/.rrdatapath)
RR_Prog3NAs far as I am aware this has only been used, on programming and support servers. 

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 ${RR_Dir}/rr.var will be created. When the check configuration option is run from the new scripts.


# Roadrunner variable initialization 

There is provision for an additional per user option file $HOME/bin/rr.var, as far as I am aware this has only been used on development servers.

Thre is no template for this file.

Roadrunner Dataset

Variabes relating to a particular dataset.

Most are initalized via a call to SetDatapathEnv this function is available to any script, that has loaded setenv.lib.

VariableExpPurposeDefault
RR_DataPathNPath of current dataset$(<$HOME/.rrdatapath)
RR_DataSetNName of curent datasetread from $rrdir/.datapaths
RR_Prog1NMain program directory$RR_DataPath/cobs
RR_Prog2NUpdate program directory$RR_DataPath/newcobs
RR_ProgDatNProgram related Data
SCREENS, MENUS, etc
$RR_DataPath/instbits
dsflagYFlag name for current dataset$flagdir/$(echo ${RR_DataPath}|tr -A '/' '_')
RUNPATHYSearch path to programs and program data.${RR_ProgDat}:${RR_Prog3}:${RR_Prog2}:${RR_Prog1}:/usr/rmcobol
RM_ConfigNRM_Cobol configuration file-c $RR_DataPath/terminfo.cfg
RM_ReportNRM_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.

EDI Options.

Only applicable to EDI routines using edi.lib.

When called the functions edi_runcobol_import and edi_runcobol_export provided in edi.lib, invoke the configured COBOL progragram, passing it a number of arguments. Thease become part of the Linkage Section, and mimmic the environment set when a user logs in to roadrunner.

runcobol ${EDI_Import_Program} "${RM_Config}" ${RM_Report} -a "$rrcompany ${EDI_User} ${EDI_Uid} ${EDI_ErrorLevel} ${EDI_DisplayFlag} ${EDI_ParamiterMode} ${EDI_Platform} ${EDI_Import_Pmap} ${EDI_Import_SubProgram}" 
runcobol ${EDI_Export_Program} "${RM_Config}" ${RM_Report} -a "$rrcompany ${EDI_User} ${EDI_Uid} ${EDI_ErrorLevel} ${EDI_DisplayFlag} ${EDI_ParamiterMode} ${EDI_Platform} ${EDI_Export_Pmap} ${EDI_Export_SubProgram}"

Other EDI variables exist that are used in processing before invoking runcobol. Some of the EDI variables are exported, and made availble in the UNIX environment for the COBOL runtime, or any sub programs it calls.

General EDI variables

VariableExpPurposeDefault
EDI_CustomerYCustomer name for use in messages and logs.Customer
EDI_UserNRoadrunnner account name to be used by the EDI routine.EDI
EDI_UidNCoresponding Roadrunner numeric ID for temp files.132
EDI_ErrorLevelN?9
EDI_DisplayFlagN?N
EDI_ParamiterModeN?1
EDI_PlatformNComputer type.$sysname
EDI_PmapN?9999
EDI_SubProgramNName os a sub program to call.RRNOTYET
EDI_GroupNSystem group name.datalink
EDI_wdirNWorking Directory$HOME/.rtedi
N

EDI Import variables

Relate to calls and routines that Import data to the local COBOL database.

VariableExpPurposeDefault
EDI_Import_DirYCurrent directory during import.$HOME/edi/in
EDI_Import_MethodYName of a supported method.custom
EDI_Import_ProgramNCOBOL progrmam to invoke for the import.W1EDIIN2
EDI_Import_FileYedi.xml
EDI_Import_PatternYwild card patern match file names for import.$EDI_Import_File
EDI_Import_HostYHost name for network based methods.ediftp.road-runner.net
EDI_Import_URLYURL for network based methods/testxml/testjob.xml
EDI_Import_QueueY
EDI_Import_MailToY$MailTo
EDI_Import_MailCcY$MailCc
EDI_Import_FTP_UsernameN
EDI_Import_FTP_PasswordN
EDI_Import_FTP_DirN
EDI_Import_FTP_ModeNbin
FTP_Import_FTP_List_CmdN
EDI_Import_Local_DirN
EDI_Import_PmapN"9999"
EDI_Import_SubProgramNRRNOTYET
N

EDI Export variables

Relate to calls and routines that Export data to the local COBOL database.

VariableExpPurposeDefault
EDI_Export_DirYCurrent directory during export.$HOME/edi/out
EDI_Export_MethodYName of a supported method.custom
EDI_Export_ProgramNCOBOL progrmam to invoke for the export.W1EDIIN2
EDI_Export_FileYedi.xml
EDI_Export_PatternYwild card patern match file names for export.$EDI_Export_File
EDI_Export_HostYHost name for network based methods.www.roadrunner.uk.com
EDI_Export_URLYURL for network based methods/testxml/testjob.xml
EDI_Export_QueueY
EDI_Export_MailToY$MailTo
EDI_Export_MailCcY$MailCc
EDI_Export_FTP_UsernameN
EDI_Export_FTP_PasswordN
EDI_Export_FTP_DirN
EDI_Export_FTP_ModeNbin
FTP_Export_FTP_List_CmdN
EDI_Export_Local_DirN
EDI_Export_PmapN"9999"
EDI_Export_SubProgramNRRNOTYET
N

Image Library.

VariableExpPurposeDefault
IL_OwnerN
IL_GroupN
IL_dirN
N