Previous Topic: &AOMJOBCL

Next Topic: &AOMJOBNM


&AOMJOBID

A system variable that contains the JES job number that issued the current message.

This variable contains the job number associated with the current message. The first character is a letter describing the type of job followed by a five-digit number.

J00005 = JOB 5 
T00120 = TSU 120 
S03453 = STC 3453

Example: &AOMJOBID

.LOOP 
&AOMREAD SET 
&JTYP = &SUBSTR &AOMJOBNM 1 4 
&IF &JTYP = TEST &THEN &GOTO .CANJOB
 .
 .
 . 
&GOTO .LOOP
 .
 .
 . 
-*Issue JES2 Cancel via SYSCMD. 
.CANJOB 
-SYSCMD $C&AOMJOBID 
GOTO .LOOP

Note: When the job number related to a message is unavailable to AOM, &AOMJOBID is null. This occurs for messages generated by the MASTER address space, or by any subsystem not started by JES.

More information:

&AOMJOBNM