Previous Topic: &AOMJOBID

Next Topic: &AOMJSTCB


&AOMJOBNM

A system variable that contains the job name of the active address space that issued the current message.

AOM provides the job name of the job that issued the WTO or WTOR in this system variable. If an overriding job name is supplied by JES, then it is used. This means that messages originating from JES can have the job name of the target job, rather than the JES job name.

Example: &AOMJOBNM

.LOOP &AOMREAD SET
&JOBTYPE = &SUBSTR &AOMJOBNM 1 4
&IF &JOBTYPE = TEST &THEN &GOTO .TESTJOB
 .
 .
 .
&GOTO .LOOP
 .
 .
 .
.TESTJOB
   &AOMCONT COLOR=PINK HLIGHT=REVERSE
   &GOTO .LOOP

Notes:

Care should be taken when processing $HASP messages ,as this variable can contain the value JES2 rather than the name of the job that the message applies to. &AOMJOBID is a more reliable way of identifying which job the message relates to.

The name of the address space that issued a message might also be useful in constructing another, perhaps more meaningful, message.

The &AOMIJOBN system variable always contains the job name of the issuing address space.

More information:

&AOMJOBID

&AOMIJOBN