> 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/copy-of-privado-editran-v5.3-cics/reinstalacion/instalacion-onesait-editran/migracion-desde-onesait-editran-5.1-fase-3-a-onesait-editran-5.2-fase-xx.md).

# Migración desde Onesait · Editran 5.1 fase 3 a Onesait · Editran 5.2 fase xx

⚠️Es necesario haber realizado una migración a V5R1 fase 3 (ver capítulos anteriores).

En esta versión se cambia la copy común ZTBGCCOM. La nueva copy está actualizada en el [ Manual Interfaz Genérica de Aplicación](/documentacion-editran/ibm-editran-v5.3-comun-z-os/interfaz-generica-de-aplicacion.md),  en el ejemplo de programa de usuario ZTBGBU30. **Esto afecta, si los tuviera, a los programas de usuario.**

👉 En esta versión se aumenta la longitud para el nombre del fichero de aplicación y se modifica el formato de la lista de ficheros ZTBGFCAR. Esto afecta a las aplicaciones, el formato del fichero pasa de ser:&#x20;

<table data-header-hidden><thead><tr><th width="55.1728515625" valign="top"></th><th width="111.7655029296875" valign="top"></th><th width="69.54315185546875" valign="top"></th><th width="71.29638671875" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">2</td><td valign="top">Fichero</td><td valign="top">44</td><td valign="top">Alfn.</td><td valign="top"><p>Si tipo L: Nombre de la lista de ficheros que contiene los ficheros a grabar en la cola.</p><p>Si tipo F: Nombre del fichero MVS a grabar en cola.</p><p>Fichero hasta 44 posiciones.</p></td></tr><tr><td valign="top"> </td><td valign="top">Filler</td><td valign="top">1</td><td valign="top"> </td><td valign="top"> </td></tr><tr><td valign="top">2</td><td valign="top">Formato carga</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">Formato (R)egistro-(M)odificado. Si espacios, asume R</td></tr><tr><td valign="top"> </td><td valign="top">Filler</td><td valign="top">1</td><td valign="top"> </td><td valign="top"> </td></tr><tr><td valign="top">2</td><td valign="top">Lenguaje</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">Lenguaje original (E)bcdic, (A)scii, (B)inario. Si espacios, asume parámetro de perfil sesión presentación</td></tr><tr><td valign="top"> </td><td valign="top">Filler</td><td valign="top">1</td><td valign="top"> </td><td valign="top"> </td></tr><tr><td valign="top">2</td><td valign="top">Traducir</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">Traducir en Emisión (E)bcdic, (A)scii, (N)inguno. Si espacios, asume parámetro de perfil sesión presentación</td></tr><tr><td valign="top"> </td><td valign="top">Filler</td><td valign="top">1</td><td valign="top"> </td><td valign="top"> </td></tr><tr><td valign="top">2</td><td valign="top">Compresión</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">Compresión F/N. Si espacios, asume parámetro de perfil sesión presentación</td></tr><tr><td valign="top"> </td><td valign="top">Filler</td><td valign="top">28</td><td valign="top"> </td><td valign="top"> </td></tr></tbody></table>

a ser:&#x20;

<table data-header-hidden><thead><tr><th width="54.18524169921875" valign="top"></th><th width="114.72833251953125" valign="top"></th><th width="67.56787109375" valign="top"></th><th width="75.2469482421875" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">2</td><td valign="top">Formato carga</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">Formato (R)egistro-(M)odificado. Si espacios, asume R</td></tr><tr><td valign="top">2</td><td valign="top">Lenguaje</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">Lenguaje original (E)bcdic, (A)scii, (B)inario. Si espacios, asume parámetro de perfil sesión presentación</td></tr><tr><td valign="top">2</td><td valign="top">Traducir</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">Traducir en Emisión (E)bcdic, (A)scii, (N)inguno. Si espacios, asume parámetro de perfil sesión presentación</td></tr><tr><td valign="top">2</td><td valign="top">Compresión</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">Compresión F/N. Si espacios, asume parámetro de perfil sesión presentación</td></tr><tr><td valign="top"> </td><td valign="top">Filler</td><td valign="top">1</td><td valign="top"> </td><td valign="top"> </td></tr><tr><td valign="top">2</td><td valign="top">Fichero</td><td valign="top">74</td><td valign="top">Alfn.</td><td valign="top"><p>Si tipo L: Nombre de la lista de ficheros que contiene los ficheros a grabar en la cola.</p><p>Si tipo F: Nombre del fichero MVS a grabar en cola.</p><p>Fichero hasta 44 posiciones.</p></td></tr><tr><td valign="top"> </td><td valign="top">Filler</td><td valign="top">1</td><td valign="top"> </td><td valign="top"> </td></tr></tbody></table>

Las aplicaciones tendrán que escribir el nombre del fichero en la posición 6 del registro de ZTBGFCAR.

Los distintos programas que intervienen son los siguientes:

## Proceso de adaptación de estados Onesait · Editran /G <a href="#toc193204751" id="toc193204751"></a>

Se ejecutará el JCL de migración ZTBGJMES

Este JCL adaptará el fichero de Estados de editran/G.

```cobol
//KI1056EA JOB (EGDI,KIT,,99),ZTBGJBES,MSGCLASS=H,CLASS=A,             
//             MSGLEVEL=1,NOTIFY=&SYSUID                               
//*--------------------------------------------------------------------
//* ADAPTACION FICHERO ESTADOS 5.0/1 A ESTADOS 5.2                     
//*                                                                    
//* EFECTUAR PRIMERO BACKUP DE FICHERO DE ESTADOS (ZTBGJUES)           
//* MIGRAR FICHERO                                (ZTBGJMES)           
//* COMPROBAR EN IGA FICHERO CORRECTO                                  
//*  SI FICHERO INCORRECTO RESTAURAR ESTADOS      (ZTBGJRES)           
//*--------------------------------------------------------------------
//ZTBGBMES EXEC PGM=ZTBGBMES                                           
//STEPLIB  DD DSN=KI.EIDC.ZTBG.LOAD,DISP=SHR                            
//ZTBGFE51 DD DSN=KI.EIDC.ZTBG.ZTBGFEST,DISP=SHR                       
//ZTBGFE52 DD DSN=KI.EIDC.ZTBG.ZTBGFE52,DISP=SHR                       
//SYSOUT    DD SYSOUT=*                                                               
```

⚠️ Es obligatorio ejecutar este proceso.

El fichero de Estados de 5.2 no podrá funcionar con editran 5.0 / 5.1 por lo que en caso de querer revertir el cambio habrá que recurrir a un back-up previo.

## Proceso de adaptación del fichero de Gestión de claves Onesait · Editran /GC <a href="#toc193204752" id="toc193204752"></a>

Sólo se realizarán en caso de tener contratada la licencia RSA.

Se ejecutará el JCL de migración ZTBPJAGC

Este JCL adaptará el fichero de gestión de claves de editran/GC.

```cobol

//KI10628F JOB (SNIM,KIT,,99),ZTBPJAGC,MSGCLASS=H,CLASS=A,   
//             MSGLEVEL=1,NOTIFY=&SYSUID                     
//*-----------------------------------------------------------
//*                 GESTION DE CLAVES                        
//*            ADAPTACION DE LOS PERFILES A 5.2              
//*-----------------------------------------------------------
//ZTBPMAGC EXEC PGM=ZTBPBAGC                                 
//STEPLIB  DD   DSN=KI.EGTC.ZTBP.LOAD31,DISP=SHR             
//         DD   DSN=KI.EITC.ZTBG.LOAD,DISP=SHR               
//ZTBPFGC  DD   DSN=KI.EGTC.ZTBP.ZTBPFGC,DISP=SHR            
//SYSOUT   DD   SYSOUT=*                                      
```

⚠️Es obligatorio ejecutar este proceso.

El fichero de Gestión de claves de 5.2 no podrá funcionar con editran 5.0 / 5.1 por lo que en caso de querer revertir el cambio habrá que recurrir a un back-up previo.

## Proceso de migración de claves RSA de Onesait · Editran /GC <a href="#toc193204753" id="toc193204753"></a>

Sólo se realizarán en caso de tener contratada la licencia RSA.

Se ejecutará el JCL ZTBPJKGC

Este primer paso obtendrá los ficheros con las etiquetas de las claves RSA, locales y remotas, que no estén canceladas en editran/GC.

Se elegirán las claves a migrar según la ficha SYSIN explicada en el JCL.

```cobol
//KI10628F JOB (SNIM,KIT,,99),ZTBPJKGC,MSGCLASS=H,CLASS=A,            
//             MSGLEVEL=1,NOTIFY=&SYSUID                              
//*********************************************************************
//******************************************************************* 
//*-----------------------------------------------------------        
//*                 GESTION DE CLAVES                                 
//*       CREACION DE LOS FICHEROS PARA LA MIGRACION                  
//*       DE CLAVES RSA DESDE CRIPTOLIB A ICSF                        
//*  SYSIN: 1-2-333333333-444444444                                   
//*      1 - TIPO DE CLAVE: LOCAL (L), REMOTA (R) O AMBAS(X)          
//*      2 - SUBSISTEMA DE CLAVES (EN BLANCO PARA SELECCION GENERICA) 
//*      3 - CODIGO LOCAL (CEROS PARA SELECCION GENERICA)             
//*      4 - CODIGO REMOTO (CEROS PARA SELECCION GENERICA)            
//*-----------------------------------------------------------        
//******************************************************************* 
//******************************************************************* 
//ZTBPBKGC EXEC PGM=ZTBPBKGC                                           
//STEPLIB  DD   DSN=KI.EGDC.ZTBP.LOAD31,DISP=SHR                      
//         DD   DSN=KI.EITC.ZTBG.LOAD,DISP=SHR                        
//ZTBPFGC  DD   DSN=KI.EGTC.ZTBP.ZTBPFGC,DISP=SHR                     
//ZTBSFLPR  DD DSN=KI.EGTC.RSACIC.LABLOCAL,                           
//             DISP=(NEW,CATLG),                                      
//             DCB=(RECFM=FB,LRECL=129,BLKSIZE=0,DSORG=PS),           
//             SPACE=(TRK,(10,1),RLSE)                                
//ZTBSFLPU  DD DSN=KI.EGTC.RSACIC.LABAJENA,                           
//             DISP=(NEW,CATLG),                                      
//             DCB=(RECFM=FB,LRECL=64,BLKSIZE=0,DSORG=PS),            
//             SPACE=(TRK,(10,1),RLSE)                                 
//SYSOUT    DD SYSOUT=*                                               
//SYSIN     DD *                                                      
X- -000000000-000000000                                                
/*                                                        
//SORTEDI  EXEC PGM=SORT                                 
//SYSOUT   DD SYSOUT=*                                   
//SORTIN   DD DSN=KI.EGDC.RSACIC.LABLOCAL.DUP,           
//            DISP=(OLD)                                  
//SORTOUT  DD DSN=KI.EGDC.RSACIC.LABLOCAL,               
//            DISP=(NEW,CATLG),                          
//            DCB=(RECFM=FB,LRECL=129,BLKSIZE=0,DSORG=PS),
//            SPACE=(TRK,(10,1),RLSE)                     
//SYSIN  DD *                                            
  SORT FIELDS=(1,64,A),FORMAT=BI,NOEQUALS                
  SUM FIELDS=NONE                                        
/*                                                     
```

Se ejecutarán los JCL ZTBSJMPR y ZTBSJMPU&#x20;

Estos JCL incorporarán en el fichero de claves públicas PKDS, del servicio criptográfico ICSF, las claves seleccionadas en el paso previo y que se encuentran en el fichero de claves de la CRIPTOlib/RSA, FICHKRSA.

ZTBSJMPR (claves locales)

```cobol
//KI1056ER JOB (GCDA,KIT,,99),'MIGRA CLAVE RSA',MSGCLASS=H,CLASS=A,    
//        NOTIFY=&SYSUID                                               
//*********************************************************************
//* - MIGRACION DE CLAVES RSA DESDE CRIPTOLIB A ICSF                  *
//*********************************************************************
//PASO1 EXEC PGM=ZTBSBMPR,REGION=0M                                    
//STEPLIB   DD DSN=KI.EITC.ZTBG.LOAD,DISP=SHR                          
//          DD DSN=KI.GCTA.SCDES.LOAD,DISP=SHR                         
//FICHKDES  DD DISP=SHR,DSN=KI.GCTA.CIFRADO.FICHKDES                   
//FICHKRSA  DD DISP=SHR,DSN=KI.GCTA.CIFRADO.FICHKRSA                   
//ZTBSFLPR  DD DISP=SHR,DSN=KI.EGTC.RSACIC.LABLOCAL
//SYSOUT    DD SYSOUT=* 
//SYSPRINT  DD SYSOUT=*                                                           
```

ZTBSJMPU (claves remotas)

```cobol
//KI1056ER JOB (GCDA,KIT,,99),'MIGRA PUBLICA RSA',MSGCLASS=H,CLASS=A,  
//        NOTIFY=&SYSUID                                               
//*********************************************************************
//* - MIGRACION DE CLAVES RSA DESDE CRIPTOLIB A ICSF  (PUBLICA)       *
//*********************************************************************
//PASO1 EXEC PGM=ZTBSBMPU,REGION=0M                                    
//STEPLIB   DD DSN=KI.EITC.ZTBG.LOAD,DISP=SHR                          
//          DD DSN=KI.GCTA.SCDES.LOAD,DISP=SHR                         
//FICHKDES  DD DISP=SHR,DSN=KI.GCTA.CIFRADO.FICHKDES                   
//FICHKRSA  DD DISP=SHR,DSN=KI.GCTA.CIFRADO.FICHKRSA                   
//ZTBSFLPU  DD DISP=SHR,DSN=KI.EGTC.RSACIC.LABAJENA                    
//SYSOUT    DD SYSOUT=*                                                
//SYSPRINT  DD SYSOUT=*    
```

ℹ️ El fichero de claves de la CRIPTOlib/DES, FICHKDES, no será necesario en el caso de tener la criptografía DES sobre ICSF.                             &#x20;

## Proceso de migración de claves DES desde el fichero de claves de CRIPTOlib/DES a ICSF

Para ello primero habría que seleccionar del fichero de claves DES FICHKDES las 2 labeles que están en el entorno local de Editran/P:

```
 CAMPOS CIFRADO:                                                      
 LABEL LOCAL.....: LEDITEST            LABEL REMOTO....: REDITEST    
```

Y después todas las claves DES intercambiadas con los remotos de forma externa a Editran.

Para migrar la CRIPTOlib/DES los clientes Host tendrán que migrar las claves DES que están en el fichero FICHKDES con el programa ZTBMBDES, que lee las etiquetas de las claves a migrar de un fichero secuencial de LRECL 66, ZTBMFDES, con la siguiente estructura de registro:

<table data-header-hidden><thead><tr><th valign="top"></th><th></th><th></th></tr></thead><tbody><tr><td valign="top">REGISTRO DEL FICHERO ZTBMFDES</td><td></td><td></td></tr><tr><td valign="top">Byte 1</td><td>L/R</td><td><p>L – Clave local (Exporter)</p><p>R – Clave Remota (Importer)</p></td></tr><tr><td valign="top">Byte 2</td><td> </td><td>‘-‘</td></tr><tr><td valign="top">Bytes 3-66</td><td> </td><td>Nombre de la etiqueta de la clave a migrar (label de 64 bytes)</td></tr></tbody></table>

&#x20;

Este fichero incluirá las etiquetas de las sesiones de presentación que tienen criptografía 3.0 con autenticación DES, así como las del entorno de EDITRAN/P para recuperar las claves de la criptografía 2.2:

```
BROWSE    KI.EIDA.LABELES.FICHKDES                 Line 0000000000 Col 001 080
Command ===>                                                  Scroll ===> CSR 
******************************** Top of Data **********************************
/NXSNCEE.EXPORTER.LI999901                                                     
/NXSNCEE.IMPORTER.R4999901                                                    
******************************* Bottom of Data ********************************
```

Ejemplo de fichero entrada  ZTBMFDES:

```
 EDIT       KI.EIDA.LABELES.ZTBMFDES                        Columns 00001 00066
Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 L-NXSNCEE.EXPORTER.LI999901                                            
000002 R-NXSNCEE.IMPORTER.R4999901                                            
000003 L-LEDITEST                                            
000004 R-REDITEST                                            
******************************* Bottom of Data ********************************
```

La migración se realizará con el JCL ZTBMJDES.&#x20;


---

# 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/copy-of-privado-editran-v5.3-cics/reinstalacion/instalacion-onesait-editran/migracion-desde-onesait-editran-5.1-fase-3-a-onesait-editran-5.2-fase-xx.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.
