Configuring Roadrunner {Roadtech Administrative scripts for AIX, SysV, Redhat}

Roadrunner

This section covers question relating to Roadrunner and the systems on which it is available.

RMcobol

RoadRunner is writen using the language RMcobol.

Function keys

On unix systems function keys are processed in conjunction with the terminal handeling suport of the operating system. This uses the terminfo terminal definition libraries in conjunction with the termio library calls.

If problems are experienced try to narrow down the location of the location of the problem.

Step one get to a prompt and run the following command

od -c

Press the function keys and check that the codes displayed are as expected. End with control-D or delete as the first key after a return for AIX/SCO respectively.

Check the values returned against the running terminfo database. For SCO or AIX 4 the current values can be displayed with the command.

infocmp

Or where this is not available, the following comand will work for 1 key at a time.

tput kf10|od -c

If the values that the terminal is sending donot match the coresponding values in the terminfo data base. The discrepance will have to be fixed. Try defaulting the terminal and any other appropriate steps to make shore that the correct code is being sent.

If unable to fix from the terminal the database will need to be fixed or a custom definition created.

The source files for the definitions usualy have an extension of .ti and are usualy located in

/usr/lib/terminfo

The compiled enteries are stored in subdirectories below this point.

If no discrepance exists between the the terminal and the terminfo database. Proceed to checking the cobol runtime.

In the directory where the runtime was loaded run the command

runcobol vdttest

Select the option for accept with on exception. The cobol runtime maps special key sequences such as function keys to events or "Exception codes"

Each function or action key should return a different exception code.

Providing the above test is successfull retry with any custom config file.

runcobol vdttest -c configfile

The value returned for each key is less important than that it is unique.

Run the roadrunner setup program RRTRMDEF and check that the vales displayed for the function keys match the values obtained above.

If they do not match check if the script that starts up roadrunner has be set to change or override the operating system supplied value for TERM.

Roadtech RMcobol extensions

These comprise a set of C library programmes written to add functionality to the Cobol Runtime.

These mainly give access to system or network functions that are not available as standard in Cobol.

These notes got to big and have been moved to their own page.

Roadrunner system sizeing

Considerations for sizing Roadrunner systems. These notes got to big and have been moved to their own page.

Security

On all AIX systems, since Roadrunner was ported to AIX in 1991.

The cobol datafiles containing a cutomers valuble data have been setup as only accessible, by the the Roadtech Administrative user. With the permision bits on the runtime set, so that a user who is a member of the roadrunner group, can execute the runtime and pick up the additional privaleges needed to access and update RoadRunner data files.

If we take a user John Doe, with an account and group of jdoe, beloning to the auxilary group staff, on a system where the roadruanner user is rr85, and the cobol group is rm85, their privilage sets will be as follows.

timeLogin UIDEffective UIDPrimary GIDEffective GIDGroupset
Loginjdoejdoejdoejdoejdoe, staff
runcoboljdoerr85jdoerm85jdoe, staff, rm85
subshelljdoejdoejdoejdoejdoe, staff, rm85

Note the last item subshell. The RMcobol language includes a number of extensions, one of these "SYSTEM" allows a program writen in cobol to fork a shell, or other command availale to the user. Doing this while retaing privilage would constitute a major security flaw. From the 7.xx series runtimes onwards the runtime correctly drops privalge when forking a subshell via "call SYSTEM". On the 6.xx series runtimes there were cases where this did not happen.

Where data is output via a pipline, as happens when outputting a report for printing, the cobol runtime runs with one security context, and the other end of the pipe runs with its own.

Special care needs to be taken if a programmer wishes to create a file for the user to access after the runtime has exited, or for use in a subshell the program can make use of the extention utouch to create a file owned by the real user in the users home directory, a subdirectory of the users home directory, or another directory such as /var/tmp to which they will have access when outside the RMcobol environment.

From 2003 The same security environment has been available to Linux.

Road Tech Administrative Scripts

These comprise a set programs written mainly in Korn shell script, to aid in administering the system. These notes got to big and have been moved to their own page.

Screen display

This section applies to a text based client using Roadrunner. This could be a genuine serial terminal, a network terminal, or a PC with suitable terminal emulation software.

Why are box graphics are not displaying correctly?

This is usualy a missmatch between the terminfo display description files and the version of roadrunner or version of AIX.

Check the following items.

Dec VT keys

DEC VT series terminals/emulators for thease and there keyboard maps. Section grew too big, and has been moved to its own page.

AIX administration

Section Covers variouse topics to do with system administration. Section grew too big, and has been moved to its own page.

Email AIX/SCO/Linux

Davids recomended method for sending Email from RMcobol programmes. If you have anything like a recent system you will have the m4 based configuration system for sendmail available. In this case you should see the Programming notes for sendmail part of my Email guide

If you have an old AIX 3.1, 3.2, or 4.1 system then you posibaly do not. In this case you also have an old version of sendmail without support for masquerading.

In this case please ensure that the following lpp's are installed at the latest level along with their requisites.

Edit /etc/sendmail.cf

Locate the line that starts Troot and add a line Trr85 imediatly following.

This allows roadrunner to provide the "From:" address.

This is important if the the IBM/SCO box is not the domain that you want replies to go to.

This is very likely where a customer is running a public mailserver, for the domain such as mycompany.co.uk while the IBM/SCO server is on a private network.

It is also very usefull if you are sending messages for a specific purpose and you want replies to goto a special Email account,

Edit report.cfg and add a line as follows
DEFINE-DEVICE device=EMAIL path="sendmail -tx" pipe=yes

Amend report program to add the following lines at the start of the "print". The Email addresses should be entered by the user, with defaults read from user file, customer file, supplier file, driver file, or company file as appropriate.

From: me@my.company.com
Reply-To: my.secretary@my.company.co.uk
Sender: roadrunner@my.company.co.uk
Disposition-Notification-To: Account Controler <Act.Con@my.company.co.uk>
X-Mailer: Roadrunner [en] (AIX 4.2)
X-Accept-Language: en
MIME-Version: 1.0
To: some.one@some.company.com
Cc: transport.manager@some.company.com
Bcc: my.boss@my.company.com
Subject: A Job for you
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-any.thing.you.like: This message generated by roadrunner http://www.roadrunner.uk.com

The From, To, and Subject lines are compulsary. the others are optional. You can have multiple CC/BCC lines.

Email addresses may also be in the format
"Arthur the Engineer" <a.eng@my.company>

Use a blank line to seperate the control lines from the body of the email.

Email AIX/SCO with an attachment

David's recomended method for sending Email with attachment from RMcobol programmes.

Setup as per sending a plain Email above.

Edit report.cfg and add a line as follows
DEFINE-DEVICE device=ATTACH path="awk '// //X-file/{file=\$2}END{system(\"uuencode \"file\" \"file)}'|sendmail -tx" pipe=yes

Create the file to attach preferabaly in the users home directory, see roadtech extension calls getenv and utouch.

Open file as for sending email but use the filename ATTACH.

Send the normal headers plus an additional one.

X-attach followed by the full name of your file.

Comandline options for sendmail on AIX/SCO/Linux

Generaly recomend setting all headers in the data streem.

The Following options while not recomended for general use may be usefull.

Using Roadtech RMcobol TCPIP extensions

These were initaly released in March 2001 to allow Paul to open tcp connections from cobol programs.


move 0 to ERR.
move "smtp.mycomany.co.uk" to HOST.
move "smtp" to SERVICE.
Call TCPOPEN2HOST using HOST, SERVICE, ERR;
On Exception move "TcpOpen2Host not supported" to ENV-VAL.


move 0 to ERR.
move "From: me@my.company.co.uk" to USER.
Call TcpWriteLn using USER, ERR; 
On Exception move "TcpWriteLn not supported" to ENV-VAL.

Continue as in the first example to send the rest of the headers, a blank line, and then the message body.

Finish by calling TcpClose to close the connection.

Printing Barcodes

Printing Barcodes From Roadrunner

Section grew too big, and has been moved to its own page.