If an ADS dialog (optionally within an ADSA application) runs into an unexpected problem, it can terminate the execution by means of an ABORT (utility) command.
This ABORT command has two major options :
a) ABORT MESSAGE TEXT
With this option, the message text is displayed on the user's terminal (only) as part of the Dialog Abort Information screen.
b) ABORT MESSAGE CODE
With this option, the message can additionally be written to other locations as needed.
This will allow the DBA/Applications developer to make sure that such ABORT messages are more visible.
This is an example of how to use the ABORT MESSAGE CODE command.
ADS dialog coding :
MOVE '0353' TO ERROR-CODE-LNK051.
ROLLBACK.
MOVE CON( 'ABORT ABD051 : CODE = ' ERROR-CODE-LNK051 )
TO AGR-MESSAGE.
ABORT MESSAGE CODE = 999001 PARMS = (AGR-MESSAGE).
Message definition in the dictionary :
ADD
MESSAGE NAME IS DC999001
MESSAGE SEVERITY IS 0
TEXT LINE IS 1
SEVERITY IS 0
DESTINATION IS LOG
DESTINATION IS OPERATOR
MESSAGE IS
'T&$0 TASK:&$4 PROG:&$5. &01'
.
The message does not necessarily need to be defined in the dictionary, but if it is, it will allow you to add additional parameters, as shown above :
The &01 (user defined) parameter must be added in order to insert the PARMS field into the message.
The result is as follows :
<Please see attached file for image>
src="" alt=""> _______________________________________________________________________________05:23 IDMS DC999001 V67 T470 TASK:ADS PROG:ADSOMAIN. ABORT ABD051 : CODE = 0353
05.23.17 JOB44870 IDMS DC999001 V67 T470 TASK:ADS PROG:ADSOMAIN. ABORT ABD051 : CODE = 0353
It is also possible to use a non-existant message, for example DC999002. In that case, the results are slightly different
the same Dialog Abort Information screen is displayed, but this time with the DC999002 message in it :
DC999002 T492 ABORT ABD051 : CODE = 0353
05:26 IDMS DC999002 V67 T492 ABORT ABD051 : CODE = 0353
05.26.16 JOB44870 IDMS DC999002 V67 T492 ABORT ABD051 : CODE = 0353
For more information about the ADS ABORT command, use the following link :
https://docops.ca.com/ca-idms-ref/19/en/ads-reference/ads-utility-commands/abort