Previous Topic: &AOMGVAR

Next Topic: &AOMMIGID


&AOMINIT

&AOMINIT indicates that the current procedure is to be regarded as an AOMPROC, and registers the procedure for message delivery.

This verb has the following format:

&AOMINIT

The &AOMINIT verb performs the following functions:

Sometimes, however, the primary AOMPROC have housekeeping work to perform before it is ready to process messages. By issuing &AOMINIT, following messages are queued, ready for the first &AOMREAD.

Note: In the procedure, do not delay too long before issuing &AOMREAD. The maximum queued message limit (as set by SYSPARMS AOMPQLIM=) could be exceeded.

Registering a procedure as a secondary AOMPROC always makes it eligible for messages. Only another AOMPROC can deliver these messages by issuing &AOMCONT NCLID or by issuing &AOMALERT NCLID.

Notes:

The &ZFDBK system variable is set to the following values after executing &AOMINIT:

0

Indicates that the primary AOMPROC issues the &AOMINIT verb. Messages are now queued.

4

Indicates that a valid procedure in AOMP environment issues the &AOMINIT verb. Procedure is now a secondary AOMPROC. Messages are queued (using &AOMCONT NCLID). This value is also returned if the procedure was already a secondary AOMPROC.

An &AOMINIT issued by an NCL procedure that is not executing in the AOMP environment causes the procedure to terminate with an error message.

If the primary AOMPROC terminates for any reason, all secondary AOMPROCs are also terminated, as the AOMP environment is terminated.

Registered secondary AOMPROCs that terminate have any queued messages processed by normal AOM delivery. If the procedure terminates abnormally, the message indicating the procedure error termination is queued to the primary AOMPROC as an AOM status message.