JOBTRM

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

JOBTRM.SBR returns the job name, terminal name, and terminal driver name of the current job. (All parameters should be mapped as strings of six or more characters.) Optionally, it can also return the same set of information for the "controlling job". The idea of the "controlling job" is mainly applicable in AMOS multitasking environments (such as MULTI and PolyTrack) where the program wants to know the identify of the "controlling" (or "real") job in order to associate some resources with the user or terminal. In the A-Shell environment, the "controlling job" will, for the purposes of this subroutine, always be the same as the current job, except in the case of PolyShell, in which case the controlling job name will be the same as the current job, minus the last character. (For example, the PolyShell control job PSHAA will spawn user jobs PSHAA1, PSHAA2, etc.)

The terminal name under A-Shell is virtually always the same as the job name.