> 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/reinstallation/onesait-editran-installation/migration-from-onesait-editran-5.1-phase-3-to-onesait-editran-5.2-phase-xx.md).

# Migration from Onesait · Editran 5.1 phase 3 to Onesait · Editran 5.2 phase xx

⚠️A migration to V5R1 phase 3 must have been performed (see previous chapters).

In this version, the common copybook ZTBGCCOM is changed. The new copybook is updated in the [ Generic Application Interface Manual](/documentacion-editran/ibm-editran-v5.3-comun-z-os-en/interfaz-generica-de-aplicacion.md), in the user program example ZTBGBU30. **This affects user programs, if any.**

👉 In this version, the length for the application file name is increased and the format of the ZTBGFCAR file list is modified. This affects the applications; the file format changes from:&#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">File</td><td valign="top">44</td><td valign="top">Alfn.</td><td valign="top"><p>If type L: Name of the file list that contains the files to be written to the queue.</p><p>If type F: Name of the MVS file to be written to the queue.</p><p>File up to 44 characters.</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">Load format</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">(R)ecord-(M)odified format. If blank, assumes 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">Language</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">Original language (E)bcdic, (A)scii, (B)inary. If blank, assumes presentation session profile parameter</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">Translate</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">Translate in (E)bcdic, (A)scii, (N)one output. If blank, assumes presentation session profile parameter</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">Compression</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">Compression F/N. If blank, assumes presentation session profile parameter</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>

to:&#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">Load format</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">(R)ecord-(M)odified format. If blank, assumes R</td></tr><tr><td valign="top">2</td><td valign="top">Language</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">Original language (E)bcdic, (A)scii, (B)inary. If blank, assumes presentation session profile parameter</td></tr><tr><td valign="top">2</td><td valign="top">Translate</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">Translate in (E)bcdic, (A)scii, (N)one output. If blank, assumes presentation session profile parameter</td></tr><tr><td valign="top">2</td><td valign="top">Compression</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">Compression F/N. If blank, assumes presentation session profile parameter</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">File</td><td valign="top">74</td><td valign="top">Alfn.</td><td valign="top"><p>If type L: Name of the file list that contains the files to be written to the queue.</p><p>If type F: Name of the MVS file to be written to the queue.</p><p>File up to 44 characters.</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>

Applications will have to write the file name in position 6 of the ZTBGFCAR record.

The different programs involved are as follows:

## Onesait status adaptation process · Editran /G <a href="#toc193204751" id="toc193204751"></a>

The migration JCL ZTBGJMES will be executed

This JCL will adapt the Editran/G Status file.

```cobol
//KI1056EA JOB (EGDI,KIT,,99),ZTBGJBES,MSGCLASS=H,CLASS=A,             
//             MSGLEVEL=1,NOTIFY=&SYSUID                               
//*--------------------------------------------------------------------
//* ADAPTATION OF STATUS FILE 5.0/1 TO STATUS 5.2                     
//*                                                                    
//* FIRST MAKE A BACKUP OF THE STATUS FILE (ZTBGJUES)           
//* MIGRATE FILE                                (ZTBGJMES)           
//* CHECK THE CORRECT FILE IN IGA                                  
//*  IF THE FILE IS INCORRECT RESTORE STATUS      (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=*                                                               
```

⚠️ It is mandatory to run this process.

The 5.2 Status file will not be able to work with editran 5.0 / 5.1, so if you want to revert the change you will have to use a previous back-up.

## Onesait key management file adaptation process · Editran /GC <a href="#toc193204752" id="toc193204752"></a>

They will only be carried out if the RSA license has been contracted.

The migration JCL ZTBPJAGC will be executed

This JCL will adapt the editran/GC key management file.

```cobol

//KI10628F JOB (SNIM,KIT,,99),ZTBPJAGC,MSGCLASS=H,CLASS=A,   
//             MSGLEVEL=1,NOTIFY=&SYSUID                     
//*-----------------------------------------------------------
//*                 KEY MANAGEMENT                        
//*            ADAPTATION OF PROFILES TO 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=*                                      
```

⚠️It is mandatory to run this process.

The 5.2 key management file will not be able to work with editran 5.0 / 5.1, so if you want to revert the change you will have to use a previous back-up.

## Onesait RSA key migration process · Editran /GC <a href="#toc193204753" id="toc193204753"></a>

They will only be carried out if the RSA license has been contracted.

The ZTBPJKGC JCL will be executed

This first step will obtain the files with the labels of the local and remote RSA keys that are not cancelled in editran/GC.

The keys to be migrated will be selected according to the SYSIN section explained in the JCL.

```cobol
//KI10628F JOB (SNIM,KIT,,99),ZTBPJKGC,MSGCLASS=H,CLASS=A,            
//             MSGLEVEL=1,NOTIFY=&SYSUID                              
//*********************************************************************
//******************************************************************* 
//*-----------------------------------------------------------        
//*                 KEY MANAGEMENT                                 
//*       CREATION OF FILES FOR THE MIGRATION                  
//*       OF RSA KEYS FROM CRIPTOLIB TO ICSF                        
//*  SYSIN: 1-2-333333333-444444444                                   
//*      1 - KEY TYPE: LOCAL (L), REMOTE (R) OR BOTH (X)          
//*      2 - KEY SUBSYSTEM (BLANK FOR GENERIC SELECTION) 
//*      3 - LOCAL CODE (ZEROS FOR GENERIC SELECTION)             
//*      4 - REMOTE CODE (ZEROS FOR GENERIC SELECTION)            
//*-----------------------------------------------------------        
//******************************************************************* 
//******************************************************************* 
//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                                        
/*                                                     
```

The JCL ZTBSJMPR and ZTBSJMPU will be executed&#x20;

These JCLs will incorporate into the PKDS public keys file of the ICSF cryptographic service the keys selected in the previous step and found in the CRIPTOlib/RSA key file, FICHKRSA.

ZTBSJMPR (local keys)

```cobol
//KI1056ER JOB (GCDA,KIT,,99),'RSA KEY MIGRATION',MSGCLASS=H,CLASS=A,    
//        NOTIFY=&SYSUID                                               
//*********************************************************************
//* - RSA KEY MIGRATION FROM CRIPTOLIB TO 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 (remote keys)

```cobol
//KI1056ER JOB (GCDA,KIT,,99),'RSA PUBLIC MIGRATION',MSGCLASS=H,CLASS=A,  
//        NOTIFY=&SYSUID                                               
//*********************************************************************
//* - RSA KEY MIGRATION FROM CRIPTOLIB TO ICSF  (PUBLIC)       *
//*********************************************************************
//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=*    
```

ℹ️ The CRIPTOlib/DES key file, FICHKDES, will not be necessary if DES cryptography is on ICSF.                             &#x20;

## DES key migration process from the CRIPTOlib/DES key file to ICSF

To do this, first you would have to select from the DES key file FICHKDES the 2 labels that are in the local Editran/P environment:

```
 ENCRYPTED FIELDS:                                                      
 LOCAL LABEL.....: LEDITEST            REMOTE LABEL....: REDITEST    
```

And then all the DES keys exchanged with the remote systems externally to Editran.

To migrate CRIPTOlib/DES, Host clients will have to migrate the DES keys that are in the FICHKDES file with the ZTBMBDES program, which reads the labels of the keys to be migrated from a sequential file of LRECL 66, ZTBMFDES, with the following record structure:

<table data-header-hidden><thead><tr><th valign="top"></th><th></th><th></th></tr></thead><tbody><tr><td valign="top">ZTBMFDES FILE RECORD</td><td></td><td></td></tr><tr><td valign="top">Byte 1</td><td>L/R</td><td><p>L – Local key (Exporter)</p><p>R – Remote key (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>Name of the label of the key to be migrated (64-byte label)</td></tr></tbody></table>

&#x20;

This file will include the labels of the presentation sessions that have 3.0 cryptography with DES authentication, as well as those from the EDITRAN/P environment to recover the keys of 2.2 cryptography:

```
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 ********************************
```

Example input file 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 ********************************
```

The migration will be carried out with the ZTBMJDES JCL.&#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/ibm-editran-v5.3-cics-en/reinstallation/onesait-editran-installation/migration-from-onesait-editran-5.1-phase-3-to-onesait-editran-5.2-phase-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.
