> 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/utilidades-ims/eleccion-de-nucleo-en-procedimientos-onesait-editran.md).

# Elección de núcleo en procedimientos Onesait Editran

Para evitar la duplicidad de procedimientos cuando se tiene más de una base de datos de emisión/recepción y por tanto, distintos núcleos de Editran, en los procedimientos se debe añadir como paso previo a los existentes uno nuevo que creará el fichero ZTBGF032, necesario para la ejecución de los procedimientos, con la ficha adecuada al núcleo correspondiente según la sesión para la que se ejecute.

El paso a añadir será el correspondiente al del JCL ZTBGJNUC que se suministra en la instalación del prodcuto convenientemente adaptado y que se muestra a continuación:

```cobol
//KI1056EA JOB (EGDC,KIT,,99),TRAN-NUCLEO,MSGCLASS=H,CLASS=A,          
//             MSGLEVEL=1,NOTIFY=&SYSUID                               
//PASOTRN  EXEC PGM=ZTBGBNUC,                                          
//         PARM='E000099930000099940PRUEBAPRUEBA/CBLQDA(ON)'           
//STEPLIB  DD DSN=KI.EGDI.LOAD,DISP=SHR                                
//         DD DSN=IMSP.SDFSRESL,DISP=SHR                            
//ZTBGFNUC DD DSN=KI.EGDI.ZTBG.ZTBGFNUC,DISP=SHR                       
//ZTBGF032 DD DSN=KI.EGDI.PRUE.ZTBGF032,DISP=(NEW,CATLG,DELETE),       
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=80),                      
//            SPACE=(TRK,(500,50),RLSE)                                
//SYSOUT   DD SYSOUT=*                                                 
//                                                                      
```

El fichero ZTBGFNUC es un fichero PS de longitud 80 fijo bloqueado que contiene las fichas BMP (que actualmente están en los ZTBGF032) correspondientes a los distintas bases de datos, y a continuación de cada una de ellas el núcleo asociado. Asimismo, contiene la ficha de ejecución del paso que lista los ficheros emitidos (ZTBGLFE) en el procedimiento posterior a emisión.

El fichero ZTBGFNUC se suministra como ejemplo en la instalación del producto y es como sigue:

```cobol
********************************* Top of Data **********************************
BMP,PROGRAMA,ZTBGENUC,,,N00000,,,,,,,,IMST,,                                   
BMP,PROGRAMA,ZTBGEIG1,,,N00000,,,,,,,,IMST,,                                ZTB1
BMP,PROGRAMA,ZTBGEIG2,,,N00000,,,,,,,,IMST,,                                ZTB2
BMP,PROGRAMA,ZTBGEIG3,,,N00000,,,,,,,,IMST,,                                ZTB3
BMP,PROGRAMA,ZTBGEIG4,,,N00000,,,,,,,,IMST,,                                ZTB4
BMP,PROGRAMA,ZTBGEIG5,,,N00000,,,,,,,,IMST,,                                ZTB5
BMP,PROGRAMA,ZTBGELFE,,,N00000,,,,,,,,IMSP,,                                ZLFE
******************************** Bottom of Data ********************************
```

En los procedimientos el fichero de salida ZTBGF032 se definirá como temporal (OLD,PASS,DELETE) y en los pasos en los que está actualmente se habrá de cambiar DISP=SHR por DISP=(OLD,PASS,DEL).

## Ejemplo.

Procedimiento posterior a emisión:

```cobol
//             PROC ORIGEN=,FUNCION=,L0=,                              
//             L1=,L2=,R1=,R2=,PR=,AP=                                 
//*--------------------------------------------------------------------
//* INDRA                                                             *
//*--------------------------------------------------------------------
//*   PROCEDIMIENTO POSTERIOR A LA EMISION DE EDITRAN/G               *
//*--------------------------------------------------------------------
//*  DATOS:                                                           *
//*      ORIGEN (O=OPERADOR,E=EDITRAN,A=JCL APLICACION) ----> 1 BYTE  *
//*                                                                   *
//*      FUNCION (02=PROCESAR PRESENTACION POSTERIOR A EMISION        *
//*               05=FIN DE EMISION DE PRESENTACION)   -----> 2 BYTES *
//*                                                                   *
//*      SESION-PRESENTACION  :                                       *
//*        CODIGO LOCAL L1  --------------------------------> 6 BYTES *
//*                     L2  --------------------------------> 3 BYTES *
//*        REMOTO       R1  --------------------------------> 6 BYTES *
//*                     R2  --------------------------------> 3 BYTES *
//*        APLICACION   PR  --------------------------------> 6 BYTES *
//*                                                                   *
//*      SESION-TRANSMISION  (EDITRAN/P):                             *
//*        APLICACION   AP  --------------------------------> 6 BYTES *
//*                                                  TOTAL = 33 BYTES *
//*      ALIAS ENTORNO LOCAL (PARA USOS PARTICULARES)                 *
//*                     L0  --------------------------------> 3 BYTES *
//*--------------------------------------------------------------------
//PASOTRN  EXEC PGM=ZTBGBNUC,                                          
//         PARM='&ORIGEN&L1&L2&R1&R2&PR&AP/CBLQDA(ON)'                 
//STEPLIB  DD DSN=KI.EGDI.LOAD,DISP=SHR                                
//         DD DSN=IMS910P.SDFSRESL,DISP=SHR                            
//ZTBGFNUC DD DSN=KI.EGDI.ZTBG.ZTBGFNUC,DISP=SHR                       
//ZTBGF032 DD DSN=&&ZTGF032,DISP=(NEW,PASS,DELETE),                    
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=80),                      
//            SPACE=(TRK,(500,50),RLSE)                                
//SYSOUT   DD SYSOUT=*                                                 
//                                                                     
//*--------------------------------------------------------------------
//A3P EXEC PGM=ZTBGB130,REGION=4M,                                     
//             PARM='&ORIGEN&FUNCION&L1&L2&R1&R2&PR&AP/CBLQDA(ON)'     
//STEPLIB  DD DSN=IMS910P.SDFSRESL,DISP=SHR                            
//         DD DSN=KI.EGDI.LOAD,DISP=SHR                                
//         DD DSN=KI.GCDA.SCDES.LOAD,DISP=SHR                          
//DFSVSAMP DD DSN=IMS910P.PROCLIB(DFSVSAMP),DISP=SHR                   
//ZTBGFLOG DD SYSOUT=*                                                 
//ZTBGF032 DD DSN=&&ZTGF032,DISP=(,PASS,DEL)                           
//ZTBGFLIS DD SYSOUT=*                                                 
//ZTBGFMSJ DD SYSOUT=*                                                 
//ZTBGFPRI DD SYSOUT=*,DCB=(BLKSIZE=105)                               
//ZTBGFINT DD   SYSOUT=(H,INTRDR),DCB=(BLKSIZE=80)                     
//FICHKDES DD DSN=KI.GCDA.CIFRIMS.FICHKDES,DISP=SHR                    
//CEEDUMP  DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSTCPD  DD DSN=SW.TCPIP.SEZAPARM(TCPDATB2),DISP=SHR                 
//      SET LOCAL0=&L0                                                 
//*                                                                    
//*--------------------------------------------------------------------
//* PASO PARA SACAR LISTA DE FICHEROS EMITIDOS                        *
//*--------------------------------------------------------------------
//*   FUNCION -------------------------------------------> 2 BYTES    *
//*       00 - SACA LA LISTA INDEPENDIENTEMENTE DE ESTADO PRESENTACION*
//*       02 - SACA LA LISTA SI EL ESTADO DE PRESENTACION ES FINALIZ. *
//*   SES. PRESENT. O SES. TRANSM.(DEPENDIENDO DE ORIGEN)> 24 BYTES   *
//*--------------------------------------------------------------------
//ZTBGLFE EXEC PGM=ZTBGBLFE,REGION=4M,COND=(0,NE,A3P),                 
//             PARM='&ORIGEN&FUNCION&L1&L2&R1&R2&PR&AP/CBLQDA(ON)'     
//STEPLIB  DD DSN=IMS910P.SDFSRESL,DISP=SHR                            
//         DD DSN=KI.EGDI.LOAD,DISP=SHR                                
//ZTBGFLOG DD SYSOUT=*                                                 
//ZTBGF032 DD DSN=&&ZTGF032,DISP=(,PASS,DEL)                           
//* ESTE FICHERO ES NECESARIO SI SE UTILIZA EL GESTOR DE ESTADOS VSAM  
//ZTBGFLFE DD SYSOUT=*                                                 
//ZTBGFPRI DD SYSOUT=*,DCB=(BLKSIZE=105)                               
//SYSOUT   DD SYSOUT=*                                                 
//CEEDUMP  DD SYSOUT=*                                                 
```


---

# 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/utilidades-ims/eleccion-de-nucleo-en-procedimientos-onesait-editran.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.
