Please enable JavaScript to view this site.

A-Shell Reference

TRMDEF=Device, Jobname, Terminal, Driver

A-Shell will automatically generate job and terminal names in the form of TSKAAA, TSKAAB as each new job is launched. For most applications, this is perfectly acceptable—and virtually unavoidable for Telnet connections. But if you want to try to associate TRMDEF and JOB names with particular terminal devices, the TRMDEF facility may help you.

The general idea is that whenever a new A-Shell session is launched, A-Shell first checks the Command Line Switches. If switch –j <jobname> has been specified, then that jobname is used. Otherwise, it determines the device name of the workstation, then checks if there are any TRMDEF statements which reference either all or part of that device name. If a match is found, then the JOBNAME, TERMINAL, and DRIVER specified in the TRMDEF statement will be assigned to the new job. Otherwise, the first available name of the type TSKAAA will be used instead.

As an example, suppose the terminal device (as displayed by the –d switch to ashell or by SYSTAT/C) is tty3a:5623. The part after the colon will change every time, but since tty3a is a regular serial port (as opposed to a network pseudo port) it will be the same each time. So if you wanted to make that terminal come up with the jobname and terminal name "ship," you could add the following statement to miame.ini:

TRMDEF=tty3a,ship,ship,am62a

When this statement is processed by an instance of A-Shell whose device name starts with "tty3a", it will cause the jobname SHIP and terminal name SHIP to be assigned to that instance. (You could theoretically make the job and terminal names different, but this doesn’t really accomplish anything other than add to the confusion, since it is not possible to change the attachment between a job and a terminal.) The terminal type am62a will also be assigned, although in most cases it is preferable to omit the terminal type from the TRMDEF line so that the terminal specified in the TERM environment variable will be used instead.

Under Windows , the device name is, in most cases, the workstation’s machine name (or "network ID") with a suffix identifying the window number appended (e.g. "SHIPPING-PC:01".) You could use this as the basis of the following TRMDEF statements:

TRMDEF=SHIPPING-PC:01,SHIP1,SHIP1,PCTDVG

TRMDEF=SHIPPING-PC:02,SHIP2,SHIP2,PCTDVG

The first line above would apply to the first window opened by the PC whose machine name was "SHIPPING-PC", and the second line would apply to the second window opened by the PC. The terminal driver name (PCTDVG) is again optional; if not specified here, the default will come from the CONSOLE statement.

For system administration convenience, you can put all of your TRMDEF directives in a separate file (trmdef.ini) which is included into the configuration file using the INCLUDE command. This file should contain one TRMDEF line for each terminal which is allowed to run the MIAME application. You may mark comment lines by starting them with a semi-colon or number.

Note: The following section applies to Unix-based systems only:

Although Unix does not have terminal drivers as such, it does have a table-driven equivalent (terminfo), which enables fairly advanced screen handling to be performed in a terminal-independent manner, though it is nowhere near as good at it as AMOS terminal drivers. A-Shell makes use of terminal driver equivalents (written in C) in order to better handle attached screens, though a generic driver (GENERC) is provided which does make use of the terminfo database.

Unix makes use of an environment variable TERM to indicate the terminal type in order to find the correct terminfo entries. A-Shell also makes use of this variable in order to determine which terminal driver to use. The TERM variable is analogous to the terminal driver name, except that it is not guaranteed to be restricted to six characters, and so is not returned directly by the gettdv() routine. The TRMDEF lines in miame.ini must therefore be kept in step with the terminal types defined on the system, with six-character equivalents of each terminal’s TERM variable setting.

Note: The following section applies to Windows-based systems only:

There is only one proper terminal driver embedded within the Windows version of A-Shell, although there are several variations:

Driver Name

Notes

PCTDV

Standard Windows.

PCTDVG

Windows version only. Same as PCTDV except certain "GUI enhancements" may be applied, such as displaying XCALL MESAG messages in a dialog box rather than on line 24.

PCUK

Standard UK (national replacement character set) version of PCTDV. The # or £ keys return ASCII character 35, and character 35 is always displayed as £.

PCUKG

Same as PCUK but with the Windows "GUI enhancements" described above.

PCFR

French national replacement keyboard version. Same idea as PCUK

PCFRG

Same as PCFR but with the "GUI enhancements" described above.

 

Note that TRMDEF directives are entirely optional, and in most cases, are best ignored, since unique job and terminal names of the form TSKAAA, TSKAAB, etc. will be created.

The use of INCLUDE in order to separate terminal definitions is entirely optional. If TRMDEF commands are used, then they can equally well be given in the main MIAME environment definition file.