Please enable JavaScript to view this site.

A-Shell Reference

Rewritten May 2026

xcall JOBTRM, jobnam, trmnam, tdvnam {,ctljob, ctltrm, ctltdv}

JOBTRM returns the job name, terminal name, and terminal driver name of the current job, and optionally, of the "controlling job". The idea of the "controlling job" is mainly applicable in serial environments, where it multitasking utilities (such as MULTI and PolyShell) may be employed to allow a single real terminal and job to dynamically attach to and thereby control multiple virtual terminals and jobs. In such cases, an application may want to identify the "controlling" or "real" terminal/job in order to associate some real resource with it, such as a nearby printer. In the modern A-Shell environment where virtually all terminal connections are made from smart workstations capable of supporting multiple such connections over TCP, the terminal name is virtually always the same as the job name. Except for the case of PolyShell, the controlling job / terminal is the same as the current one—and even in the PolyShell case, the control job / terminal will share the same first five characters as its spawned child jobs -- PSHAA1, PSHAA2, etc.

Parameters

jobnam (String,6+)  [out]

Returns the job name.

trmnam (String,6+)  [out]

Returns the terminal name. The terminal name under A-Shell is virtually always the same as the job name.  In predecessor environments involving serial connections, it made sense to define terminals (ports), known as "TRMDEFs", separately from jobs (processes) and then attach one to another.  But this technique has largely gone by the wayside.

tdvnam (String,6+)  [out]

Returns the terminal driver (i.e. terminal emulation) name.

The remaining parameters have no practical use and are generally omitted, except in the PolyTrack environment:

ctljob (String,6+)  [out]

Returns the job name for the controlling terminal. (See notes above.)

ctltrm  (String,6+)  [out]

Returns the terminal name for the controlling terminal.

ctltdv (String,6+)  [out]

Returns the terminal driver / emulation for the controlling terminal.

See Also

Dot Variables (.JOBNAME, .TERMINAL)