:STOP

Script Statement: It cancels the processing of a scriptEgalement un type d'objet distinct dans l'Automation Engine.

Syntax

:STOP [Stop Mode]

Syntax

Description/Format

Stop Mode

You can pass on the following parameters to the :STOP statement in the form of Stop Modes:

"No specification"
It cancels the processing of a script and writes the message "U0010014" to the activation report.

NOMSG, Message Number[, Message Text]
Cancels the activation of an object without an error. A message can be created for this purpose.

MSG, Error Number, Error Text
Cancels the activation of an object and gives an error message.

Comments

:STOP cancels the activation of an object. Therefore, this script element cannot be used in the Post Process tab. Automic recommends using the statement :MODIFY_STATE instead.

Stop Mode NOMSG

The :STOP statement with Stop Mode NOMSG can be used in objects which do not require an agent"Programme permettant l'exécution de Traitements sur des systèmes cible comme un ordinateur ou des solutions d'entreprise. Egalement un type d'objet distinct dans l'Automation Engine. [Anciennement appelé ""Exécuteur de tâches"".]" for processing. It is therefore possible to work only with script statements (to set variables, for example).

You can also create a message by using the parameter Stop Mode NOMSG. The Message Number is syntactically necessary but is not evaluated. The Message Text is stored in the statistics and sent as part of the confirmation when a call is made via the CallAPIInterface de programmation pouvant être exécutée en direct ou à partir d'un autre programme, afin d'exécuter un Script dans le système AE.. As a result thereof, the run number (RunIDAbréviation du numéro d'identification unique. Il s'agit plus précisément d'un nombre qui identifie clairement l'exécution d'une Tâche. Le RunID peut comporter entre 7 et 10 caractères . Ils sont attribués par le composant Automation Engine.) of a started task can be returned to the CallAPI.

Because Stop Mode NOMSG ends task activations without errors, these tasks will not appear as canceled tasks in the statistics.

Stop Mode MSG

Stop Mode MSG can be used to cancel the activation of an object with an error message. You can define an Error Number and an Error Text. This is especially important for objects that start via the AE CallAPI. The returned information is the only information about the script execution. Error numbers 50 to 59 are reserved for users.

Return code 4 is used for the error number 50 and return code 8 for the numbers ranging from 51 to 59.

Note that you can only use the error numbers 50 - 59. Using other error numbers will cause the script to abort with an error message that informs you that the specified error number is not valid.

Because Stop Mode MSG cancels task activations with an error, these tasks are listed in the statistics as canceled tasks .

If you use the :STOP statement without any parameters or with Stop Mode MSG, script processing will abort with an error and a database rollback takes place. All transactions that were not specifically executed will be rolled back. If you have used script variables, it can happen that the VariableEnregistre ou fournit les valeurs dynamiques de l'exécution. Egalement un type d'objet distinct dans Automation Engine. objects that are located at the beginning of the script already include their new values but those located at the script end won't.

The system writes transactions to the AE database (commit) when script processing is interrupted. This occurs:

You can use the script statement :WAIT 0 in order to force an interruption in script processing and also, to force a database commit.

Examples

The following example returns an error message that informs you whether a job was correctly activated or not.

:SET &ACTNR# = ACTIVATE_UC_OBJECT(JOBS, MM)
:
IF &ACTNR# = "0"
:
STOP MSG, 50, "Error in activating the job MM."
:
ELSE
:
PRINT "The job MM was activated with the activation number &ACTNR#."
:
ENDIF

See also:

Script element Description

:EXIT

Terminates the processing of a script and sends a return code.

:WAIT

This is used to stop processing of the script for a specified period of time. Meanwhile, other tasks are completed.

Script Elements - Activate Objects
Script Elements - Error Handling and Messages

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Function