> For the complete documentation index, see [llms.txt](https://docs.editran.onesait.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.editran.onesait.com/documentacion-editran/ibm-editran-v5.3-cics-en/statistics-and-monitoring/alarm-management.md).

# Alarm management

The objective of the Alarm Management subsystem is to control the normal evolution of the processes of the editran platform in each of the phases of data presentation and transmission, so that if any type of incident occurs, there is the possibility of immediate notification of those problems to different contacts (via e-mail, SMS messages, notification to external manager, etc.), as well as saving the information about the incident that occurred in a log. Alarms can also be triggered when the post-emission or post-reception steps complete successfully.

The types of alarms can be:

1. Alarms to an external manager. An example program is provided: ZTBEBA10, which displays messages and writes to the system log.
2. E-mail alarms. These can be of 3 types:

* Alarms through the z/OS SMTP server.
* Alarms through the sendmail program in the z/OS UNIX partition
* Alarms through an external manager. In this case, an IP connection is established between the host and a unix-pc-Windows server, which manages the sending. To implement the program on the server, consult INDRA.

3. Alarms to mobile phones through an external manager. In this case, an IP connection is established between the host and a unix-pc-Windows server, which manages the sending. To implement the program on the server, consult INDRA. A standard modem at 28800 with maximum speed at 57600 will need to be installed on the server, and the phone configured with speed 58600, and data exchange (fax/data) with the fax/dat reception option checked

The operation is as follows:

1. The user defines a profile file and registers sessions (with generic or specific criteria), indicating how they want notifications to be made when the send-receive process fails, whether in a pre- or post-procedure, or if an interruption has occurred with specific codes (to see them, consult the A7I codes in editran/P). It can also be done for when the post-step works correctly.
2. The user defines a log file, which contains the data of the sessions that have failed, the reason, and whether anyone has been notified of the error.
3. Once a failure occurs, the system writes to the log and notifies this incident, if so indicated.

## File definition

The definition of the ZTBEFAL, ZTBEFPE files will be carried out with the JCLs ZTBEJIAL, ZTBEJIPE respectively. It is important to note that ZTBEFAL has SHR (3,3).

## Modification of Onesait · Editran procedures <a href="#toc303669325" id="toc303669325"></a>

In the pre- and post-emission and reception procedures, as well as in the interruption procedure (ZTBGP\*\*), the file cards ZTBEFAL, ZTBEFPE must be added.

```cobol
//ZTBEFPE  DD   DSN=puntero.ZTBEFPE,DISP=SHR
//ZTBEFAL  DD   DSN=puntero.ZTBEFAL,DISP=SHR
```

&#x20;Also, a second step can be included (it is recommended) in the procedure, after the load, unload, exception, etc. step, so that if that step abends, this step is entered and the alarm is notified. If this step is not included and the previous one abends, the alarm will not be notified. If the alarm is notified, normally the previous step will not abend (it will end with rc xx), so this step will not be entered.&#x20;

```cobol
//      SET AB='ERROR ABEND CODE. CHECK JCL OUTPUT'          
//PASOERR  EXEC PGM=ZTBEBA00,COND=(ONLY),                           
//         PARM='&ORIGEN&FUNCION&L1&L2&R1&R2&AP&AB',                
//         REGION=8M,TIME=25                                        
//STEPLIB  DD   DSN=puntero.LOAD,DISP=SHR                       
//ZTBEFPE  DD   DSN=puntero.ZTBEFPE,DISP=SHR                   
//ZTBEFAL  DD   DSN=puntero.ZTBEFAL,DISP=SHR                   
//ZTBPFPE  DD   DSN=puntero.ZTBPFPE,DISP=SHR                   
//ZTBGFPER DD   DSN=puntero.ZTBGFPER,DISP=SHR                  
//ZTBGFLOG DD   DSN=puntero.ZTBGFLOG,DISP=SHR                  
//ZTBGFPRI DD   SYSOUT=*,DCB=(BLKSIZE=105)                          
//* (IGA INTERNAL READER. SET JOB OUTPUT CLASS)
//ZTBGFINT DD   SYSOUT=(H,INTRDR),DCB=(BLKSIZE=80)                  
//SYSOUT   DD   SYSOUT=*,OUTLIM=999999                              
//SYSPRINT DD   SYSOUT=*,OUTLIM=999999                              
//SYSDBOUT DD   SYSOUT=*,OUTLIM=999999                              
//ABENDAID DD   SYSOUT=*,OUTLIM=999999                              
//SYSUDUMP DD   SYSOUT=*,OUTLIM=999999                              
//SYSABOUT DD   SYSOUT=*,OUTLIM=999999                              
//CEEDUMP  DD   SYSOUT=*,OUTLIM=999999
```

## Installation tests <a href="#toc303669326" id="toc303669326"></a>

Once the product is installed, the tests will consist of defining an appropriate profile and loading it with incorrect parameters.

## Error messages <a href="#toc303669327" id="toc303669327"></a>

If an external e-mail or SMS manager is used and the sending has not been achieved, displays are shown in the procedure itself with more detailed information about the problem.&#x20;

```
* ERRORS RETURNED IN THE ZTBEBITS PROGRAM                      *
* ================================                               *
* RESULT REASON    DESCRIPTION                                *
* --------- --------------------------------------------------   *
*     91    SERVER ERROR (FUNC. 301 SEND E-MAIL)              *
*     92    SERVER ERROR (FUNC. 302 SEND SMS)                 *
*     99    REMOTE PROCESS ERROR. PROGRAM ERROR. CONNECTION ERROR *
*           TO SERVER. TCP MACROS ERROR                        *
*       1X-3X CALL AREA ERRORS TO THE ZTBEBITS PROGRAM        *
*           99/01 UNKNOWN FUNCTION                            *
*           99/06 INCORRECT TCPNAME                           *
*           99/07 INCORRECT SERVER IP ADDRESS                 *
*           99/08 INCORRECT SERVER PORT                       *
*           99/09 INCORRECT SERVER ACTIVATION SECONDS         *
*           99/11 INCORRECT E-MAIL LENGTH                    *
*           99/12 INCORRECT E-MAIL TO BE SENT                *
*           99/15 INCORRECT PROFILE SMS LENGTH               *
*           99/16 INCORRECT PROFILE SMS                     *
*           99/23 INCORRECT TEXT LENGTH                    *
*           99/24 INCORRECT TEXT                         *
*       5X  TIMEOUT ERRORS IN SERVER                         *
*           99/51 FAILED TO SEND THE ON (NOT EVEN 1 OCTET) *
*           99/52 FAILED TO SEND THE ON (SOME OCTET)       *
*           99/53 FAILED TO SEND DATA (NOT EVEN 1 OCTET)  *
*           99/54 FAILED TO SEND DATA (SOME OCTET)       *
*           99/55 FAILED TO RECEIVE DATA (NOT EVEN 1 OCTET) *
*           99/56 FAILED TO RECEIVE DATA (SOME OCTET)      *
*           99/57 FAILED TO SEND THE OFF (NOT EVEN 1 OCTET) *
*           99/58 FAILED TO SEND THE OFF (SOME OCTET)     *
*       6X-7X TCP/IP ERRORS IN CONNECTION WITH THE SERVER   *
*           99/61 ERROR IN INITAPI MACRO                   *
*           99/62 ERROR IN SOCKET MACRO                    *
*           99/63 ERROR IN GETHOSTBYNAME MACRO             *
*           99/64 ERROR IN SETSOCKOPT MACRO                *
*           99/65 ERROR IN FCNTL MACRO                     *
*           99/66 ERROR IN CONNECT MACRO                   *
*           99/67 ERROR IN WRITE SELECT MACRO              *
*           99/68 ERROR IN READ MACRO                      *
*           99/69 ERROR IN READ SELECT MACRO               *
*           99/70 ERROR IN WRITE MACRO                     *
*           99/71 ERROR IN EZACIC08 MACRO                  *
*           99/72 ERROR IN EZACIC06 MACRO                  *
*       8X  ERRORS IN THE DATA RETURNED BY THE SERVER      *
*           99/81 INVALID DATA LENGTH                      *
******************************************************************
```

For example, the following display would be shown in the procedure if the server is not active:&#x20;

```
*************************************************
*ERRORS DETECTED IN EDITRAN/E TCP/IP PROCESS*
-------------------------------------------------
                                                 
WRITE MACRO ERROR. ERRNO: 0000000061             
RETURN CODE : 00099                        
REASON CODE   : 00070                        
                                                 
*************************************************
In the alarm log, continuing with the previous example, the following error would appear:
                                                 <----- RESULTS ----->         
                                                 EXT. <-- E-MAIL --> SMS          
             SESSION            DATE      TIME   R-01 R-02 R-03 R-04 R-05         
    ======================== ========== ======== ==== ==== ==== ==== ====         
    XXXXXXXXXXXXXXXXXXXXXXXX DD/MM/YYYY HH:MM:SS  00   00   00   99   00          
    ZTBGXXXX: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
 
* ERRORS RETURNED IN THE ZTBEBA00 PROGRAM                      *
* ================================                               *
* RESULT REASON    DESCRIPTION                                *
* --------- --------------------------------------------------   *
*     81    ERROR OPENING ZTBGFINT                           *
*     82    ERROR WRITING ZTBGFINT                          *
*     83    ERROR CLOSING ZTBGFINT                             *
*     84    ERROR ALLOCATING FCOSMTP                              *
*     85    ERROR OPENING FCOSMTP                               *
*     86    ERROR WRITING FCOSMTP                            *
*     87    ERROR CLOSING FCOSMTP                              *
*     88    ERROR DEALLOCATING FCOSMTP                           *
```

## SMTP e-mail parameterization

In the editran/E profiles, 2 related parameters will be requested:

* SMTP machine domain name. This is the value specified in NJENODENAME
* Startup procedure name.

It is configured as follows (example):

```
;***********************************************************************
;
;  Defaults that normally aren't changed:
;
PORT 25                 ; Port to accept incoming mail
BADSPOOLFILEID tcpmaint ; Mailbox where unreadable spool files and
                        ; looping mail are transferred.
LOG                     ; Log all SMTP mail delivered
INACTIVE 180            ; Time-out for inactive connections
FINISHOPEN 120          ; Time-out for opening TCP connections
RETRYAGE 3              ; Keep retrying mail delivery for 3 days
WARNINGAGE 3            ; Warn sender that mail has been undeliverable
                        ; for 1 day, but that attempts to deliver the
                        ; mail will continue for another 2 days.
RETRYINT 2              ; Retry mail delivery every 2 hours
;ETRYINT 120            ; Retry mail delivery every 2 hours
MAXMAILBYTES 524288     ; Largest mail to accept over a TCP connection
RESOLVERRETRYINT 20     ; Retry pending name resolutions every 20 minutes
RCPTRESPONSEDELAY 60    ; How long to delay RCPT TO: response when
                        ; waiting for an address resolution.
TEMPERRORRETRIES 0      ; How many times to retry temporary delivery
                        ; errors.  The default, 0, means retry for
                        ; RETRYAGE days; otherwise the mail is returned
                        ; after this number of deliver attempts.
SPOOLPOLLINTERVAL 30    ; Amount of time in seconds between spool polling
TIMEZONE EST            ; Specifies the printable 3-letter name of
                        ; the local time zone.  Remember to change this
                        ; for daylight saving time.
DEBUG                 ; Normally not used, causes debug information to
                        ; be written to the SMTP DEBUG file.
;
NJENODENAME NODOMVSB
;***********************************************************************
;
; The following statements tell SMTP where incoming mail is stored
; while it is being queued for delivery.
;
MAILFILEDSPREFIX SMTP   ; Data set prefix name for queued mail files
MAILFILEUNIT SYSDA      ; MVS unit name for new file allocations
; MAILFILEVOLUME volume ; MVS volume name for new file allocations
;
;***********************************************************************
;
; The POSTMASTER statement specifies the mailboxes where mail
; addressed to postmaster is spooled.  Multiple POSTMASTER statements
; can be specified when not running in SECURE mode.
;
POSTMASTER tcpmaint
;
;***********************************************************************
;
; Use the SMSGAUTHLIST statement to specify the addresses of local
; users authorized to issue privileged SMTP SMSG commands.
;
SMSGAUTHLIST
    TCPMAINT
    SWTJLAM
ENDSMSGAUTHLIST
;
;***********************************************************************
;
; The OUTBOUNDOPENLIMIT statement specifies the maximum number of
; simultaneous TCP connections over which SMTP will actively deliver
; mail.
;
OUTBOUNDOPENLIMIT 10
;
;***********************************************************************
;
; The REWRITE822HEADER statement specifies whether SMTP will
; rewrite the RFC822 headers on all mail passing from NJE to TCP
; through the mail gateway. The SMTP.RULES data set specifies how the
; server is to rewrite the headers.
;
; The PRINT | NOPRINT options specify whether SMTP will print
; the rules to the SMTP output when SMTP starts.
;
REWRITE822HEADER YES PRINT
;
;***********************************************************************
IPMAILERADDRESS 192.168.15.22
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.editran.onesait.com/documentacion-editran/ibm-editran-v5.3-cics-en/statistics-and-monitoring/alarm-management.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
