> 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-ims-en/utilidades-ims/borrado-tampon-emisor-receptor/borrado-de-la-base-de-datos.md).

# Database deletion

Another BMP process will take the list of sessions generated in the previous step and proceed with the actual deletion from the database.

The input is the list of ZTBGFSES sessions generated by ZTBGJBO1 and a SYSIN card with a parameter indicating whether to act on the send or receive buffer. This list must be verified by the user to avoid deleting sessions that are still useful. Its contents can be modified manually.

The process does not check the send/receive status in Editran. It also does not perform any type of ENQ on the presentation session. It is recommended to make a backup before performing the deletion.

The process is launched with JCL ZTBGJBO2.

It runs in a BMP with write access to the database, performing a CHKP-POINT every 100 deleted records or every session change. We could run it with the IGA load PSB ZTBGEIG1, with the precaution of not blocking other load processes. Deletion is performed session by session by reading each record by direct access (adding 1 to read the next), exactly as the product does.

The output is a listing indicating the number of records deleted in each session.

If the process were interrupted, it could be restarted by specifying the same list of sessions.

Errors will be shown in the Editran/G log.

## ZTBGJBO2.

To delete the sessions selected in the previous report, we use the ZTBGFSES file obtained there, indicating in SYSIN whether it is Send or Receive.

```cobol
 EDIT       KI.EGDI.ZTBG.JCLS(ZTBGJBO2) - 01.12             Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR 
//KI0E8A2B JOB (EGDC,KIT,,99),'ZTBGJBO2',MSGCLASS=H,CLASS=A,   
//             NOTIFY=&SYSUID                                  
//LIBPROC JCLLIB ORDER=IMSP.PROCLIB                            
//*------------------------------------------------------------
//*   DELETION OF THE SEND/RECEIVE DB. STEP 2          
//*   RUN ZTBGJBO1 PREVIOUSLY                            
//*    UNCONDITIONALLY DELETES THE BUFFER RECORDS OF THE 
//*    CONTAINED IN ZTBGFSES                                  
//*   RUN ZTBGJPET AFTERWARDS                                
//*------------------------------------------------------------
//*------------------------------------------------------------
//*                                                            
//*FILE FORMAT OF THE SESSIONS FILE                             
//*                                                            
//*      LLLLLLLLL-RRRRRRRRR-PPPPPP-N-TTTTTT                   
//*                                                            
//*      LLLLLLLLL  LOCAL CODE                               
//*      RRRRRRRRR  REMOTE CODE                              
//*      PPPPPP     PRESENTATION APPLICATION                 
//*      N                                                     
//*      TTTTTT     TRANSMISSION APPLICATION                   
//*                                                            
//*SYSIN FORMAT X:                                         
//*      E - SEND                                           
//*      R - RECEIVE                                         
//*------------------------------------------------------------
//ZTBGEBO2  EXEC IMSBATCH,MBR=ZTBGEBO2,PSB=ZTBGEBO2,REGION=0M  
//STEPLIB  DD DSN=KI.EGDI.LOAD,DISP=SHR                        
//SYSOUT   DD SYSOUT=*                                         
//CEEDUMP  DD SYSOUT=*                                         
//ZTBGFLOG DD SYSOUT=*                                         
//ZTBGFLIS DD SYSOUT=*                                         
//ZTBGFMSJ DD SYSOUT=*                                         
//ZTBGFPRI DD SYSOUT=*,DCB=(BLKSIZE=105)                       
//ZTBGFINF DD SYSOUT=*                                         
//*SEQUENTIAL OF 80                                            
//ZTBGFSES DD DSN=KI.EGDI.ZTBG.ZTBGFSES,DISP=SHR               
//SYSIN    DD   *                                              
E                                                              
//                                                             
```

## Listing. <a href="#toc28427751" id="toc28427751"></a>

The deletion run will indicate the actual records deleted.

```
   DATE : 23/06/2026  D E L E T I O N   D B  R E C E I P T I O N (ZTBPDEMD) -EDITRAN-    PAGE:   1
   TIME  : 17:03:40                                                            
                                                                               
                     RECORDS       LOCAL    REMOTE   APPLICATION                  
                  ---------------  --------- --------- ------                  
                                5  000099980 000099940 CE9994                  
                                5  000099980 000099940 CE9998                  
                                5  000099980 000099940 EE9994                  
                                4  000099980 000099940 ER9998                  
                                9  000099980 000099940 OR9998                  
                            2.352  000099980 000099940 TEST                  
                            2.756  000099980 000099940 PRUMJ1                  
                                5  000099980 000099940 TE9994                  
                                5  000099980 000099940 VR9994                  
        -------------------------  --------------------------                  
        TOTAL REC:          5.146  TOTAL SESSIONS:         09
                  
                   ***   E N D     O F    L I S T I N G   ***                                                         
```


---

# 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-ims-en/utilidades-ims/borrado-tampon-emisor-receptor/borrado-de-la-base-de-datos.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.
