How to ensure that the ADS ABORT message also is written to the CA-IDMS DC log and/or Operator console ?

Document ID : KB000010524
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

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.

Background:

This will allow the DBA/Applications developer to make sure that such ABORT messages are more visible.

Environment:
IBM z/OS, z/VSE, z/VM
Instructions:

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 :

  1. &S0  : the task id of the involved task
  2. &S4  : the current task code (from the TCE)
  3. &S5  : the name of the current program (from the TCECPRGM field of the TCE)

The &01 (user defined) parameter must be added in order to insert the PARMS field into the message.

 

The result is as follows :

  • on the user's terminal :

           _______________________________________________________________________________
                 CA ADS RELEASE 19.0            *** DIALOG ABORT INFORMATION ***    ABRT
          DC999001 T594 TASK:ADS PROG:ADSOMAIN. ABORT ABD051 : CODE = 0353               
                                                                               
                                                                               
          DATE....: 17.144      TIME....: 07:38:45.88        TERMINAL....: LTVTM001     
                                                                               
          ERROR OCCURRED IN DIALOG......: DBELABRT                                      
                         AT OFFSET......: 464                                            
                         IN PROCESS.....: DBELABRT-PMP                     VERSION:    1
                         AT IDD SEQ NO. : 00000500                                       
                                                                               
          SEQUENCE                                                                      
          NUMBER:         SOURCE :                                                      
          00000400     TO AGR-MESSAGE.                                                   
          00000500   ABORT MESSAGE CODE = 999001 PARMS = (AGR-MESSAGE).                  
          00000600                                                                       
                                                                               
          HIT ENTER TO RETURN TO DC OR ENTER NEXT TASK CODE:                             
         ______________________________________________________________________________

  • in the CA-IDMS DC log :

        05:23 IDMS DC999001 V67 T470 TASK:ADS PROG:ADSOMAIN. ABORT ABD051 : CODE = 0353

  •  on the Operator console :

     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

  • on the user's terminal :

        the same Dialog Abort Information screen is displayed, but this time with the DC999002 message in it :

        DC999002 T492 ABORT ABD051 : CODE = 0353

  • in the CA-IDMS DC log :

    05:26 IDMS DC999002 V67 T492 ABORT ABD051 : CODE = 0353

  • on the Operator console :

    05.26.16 JOB44870 IDMS DC999002 V67 T492 ABORT ABD051 : CODE = 0353

 

 

Additional Information:

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