> 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/firma-electronica/funciones-batch.md).

# Funciones Batch

Editran/FF realiza las operaciones de firma y verificación a través de procedimientos batch que usualmente se asocian al procedimiento previo a emisión y posterior a recepción de Editran.

## Procedimientos de Onesait · Editran/FF <a href="#toc199404899" id="toc199404899"></a>

Los procedimientos que se suministran y que se pondrán en la sesión de presentación que requiera la firma de ficheros son:

### ZTBFP1 – A1P: carga/envío de los ficheros firmados

PASO01: carga/envío de los ficheros firmados

```cobol
//      PROC ORIGEN=,FUNCION=,L0=L00,                                  
//           L1=,L2=,R1=,R2=,AP=,PR=,LF=S,FV=F                         
//*--------------------------------------------------------------------
//* INDRA *                                                            
//*--------------------------------------------------------------------
//*   PROCEDIMIENTO PREVIO A LA EMISION DE EDITRAN/FF                 *
//*--------------------------------------------------------------------
//* EDITRAN/G                                                          
//*  DATOS:                                                           *
//*      ORIGEN (O=OPERADOR,E=EDITRAN,A=JCL APLICACION) --->  1 BYTE  *
//*                                                                   *
//*      FUNCION (01=CARGA DE EMISION DE PRESENTACION,                *
//*               03=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-TRASMISION (EDITRAN/P):                               *
//*        APLICACION   AP  ------------------------------->  6 BYTES *
//*                                                  TOTAL = 33 BYTES *
//*      LISTA FICHEROS (S) OBLIGATORIA:                               
//*                     LF  --------------------------------> 1 BYTE  *
//*      ALIAS ENTORNO LOCAL (PARA USOS PARTICULARES)                 *
//*                     L0  --------------------------------> 3 BYTES  
//*                                                                    
//* EDITRAN/FF                                                         
//*      FIRMA DE DATOS (F=FIRMA FICHEROS, V=VERIFICA FIRMA)           
//*                     FV  --------------------------------> 1 BYTE   
//*--------------------------------------------------------------------
//* PASO01- PASO DE FIRMA DE FICHEROS).                                
//* SI LEE LA SESION Y NO SE TRATA DE SESION FF, ACABA CON RC=01       
//*--------------------------------------------------------------------
//*--------------------------------------------------------------------
//PASO01 EXEC PGM=ZTBFBEFF,                                            
//             PARM='&ORIGEN&FUNCION&L1&L2&R1&R2&AP&FV/CBLQ(ON)',   
//             REGION=0M,TIME=1440                                     
//STEPLIB   DD DSN=KI.EIDA.LOAD,DISP=SHR                               
//          DD DSN=KI.EIDC.LOAD,DISP=SHR                               
//          DD DSN=IMSP.SDFSRESL,DISP=SHR                              
//SYSTCPD   DD DSN=SW.TCPIP.SEZAPARM(TCPDATB4),DISP=SHR                
//ZTBFFLOG  DD SYSOUT=*                                                
//SYSOUT    DD SYSOUT=*                                                
//SYSPRINT  DD SYSOUT=*                                                
//CEEDUMP   DD SYSOUT=*                                                
//ZTBGFCAR  DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBGFCAR,DISP=SHR    
//ZTBFFCAR  DD DSN=&&ZTBFFCAR,DISP=(NEW,PASS,DELETE),                  
//             DCB=(RECFM=FB,LRECL=80),                                
//             SPACE=(TRK,(500,50),RLSE)                               
//*--------------------------------------------------------------------
//* A1P. CARGA DE EDITRAN                                              
//*--------------------------------------------------------------------
//A1P     EXEC PGM=ZTBGB110,COND=(0,NE),REGION=0M,TIME=1440,           
//             PARM='&ORIGEN&FUNCION&L1&L2&R1&R2&PR&AP&LF/CBLQDA(ON)'  
//STEPLIB   DD DSN=KI.EIDA.LOAD,DISP=SHR                               
//          DD DSN=KI.EIDC.LOAD,DISP=SHR                               
//ZTBGFLOG  DD SYSOUT=*                                                
//ZTBGFLIS  DD SYSOUT=*                                                
//ZTBGFMSJ  DD SYSOUT=*                                                
//ZTBGFPRI  DD SYSOUT=*,DCB=(BLKSIZE=105)                              
//ZTBGFINT  DD SYSOUT=(H,INTRDR),DCB=(BLKSIZE=80)                      
//ZTBGFTCO  DD DSN=KI.EIDC.ZTBG.ZTBGFTCO,DISP=SHR                      
//CEEDUMP   DD SYSOUT=*                                                 
//SYSOUT    DD SYSOUT=*                                                
//ZTBGFCAR  DD DSN=&&ZTBFFCAR,DISP=(OLD,PASS,DELETE)                   
//*                                                                    
//      SET LOCAL0=&L0
```

### ZTBFP4 – Paso A4P: descarga de los ficheros recibidos

PASO01: verificación de los ficheros firmados

PASO02: adaptación del fichero de datos una vez separado de la firma

```cobol
//      PROC ORIGEN=,FUNCION=,L0=L00,                                  
//           L1=,L2=,R1=,R2=,AP=,PR=,FV=V,LF=                          
//      SET LF=N                                                       
//*                                                                     
//*--------------------------------------------------------------------
//*   PROCEDIMIENTO POSTERIOR A LA RECEPCION DE EDITRAN/FF            *
//*--------------------------------------------------------------------
//*  DATOS:                                                           *
//*      ORIGEN (O=OPERADOR,E=EDITRAN,A=JCL APLICACION) ----> 1 BYTE  *
//*                                                                   *
//*      FUNCION (07=DESCARGA DE RECEPCION DE PRESENTACION            *
//*               09=FIN DE RECEPCION 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 *
//* EDITRAN/FF                                                         
//*      FIRMA DE DATOS (F=FIRMA FICHEROS, V=VERIFICA FIRMA)           
//*                     FV  --------------------------------> 1 BYTE   
//*--------------------------------------------------------------------
//A4P      EXEC PGM=ZTBGB140,REGION=0M,TIME=1440,                      
//          PARM='&ORIGEN&FUNCION&L1&L2&R1&R2&PR&AP/CBLQDA(ON)'        
//STEPLIB   DD DSN=KI.EIDA.LOAD,DISP=SHR                               
//          DD DSN=KI.EIDC.LOAD,DISP=SHR                               
//ZTBGFLOG DD SYSOUT=*                                                 
//ZTBGFLIS DD SYSOUT=*                                                 
//ZTBGFMSJ DD SYSOUT=*                                                 
//ZTBGFPRI DD SYSOUT=*,DCB=(BLKSIZE=105)                               
//ZTBGFTCO DD DSN=KI.EIDC.ZTBG.ZTBGFTCO,DISP=SHR                       
//SYSOUT   DD SYSOUT=*                                                  
//SYSPRINT DD SYSOUT=*                                                 
//CEEDUMP  DD SYSOUT=*                                                 
//ZTBGFINT DD SYSOUT=(H,INTRDR),DCB=(BLKSIZE=80)                       
//      SET LOCAL0=&L0                                                 
//*--------------------------------------------------------------------
//*PASO VALIDO PARA FF. BORRA LA LISTA DE SALIDA CON RESULTADO DE VERI-
//*FICACION DE LA FIRMA                                                
//*********************************************************************
//INBORR0  EXEC PGM=IEFBR14                                            
//LISTAFL  DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBGFLFE,             
//        DISP=(MOD,DELETE,DELETE),SPACE=(TRK,(1,1),RLSE)              
//LISTAFS  DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBFFSAL,             
//        DISP=(MOD,DELETE,DELETE),SPACE=(TRK,(1,1),RLSE)              
//LISTAF2  DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBFFLF2,             
//        DISP=(MOD,DELETE,DELETE),SPACE=(TRK,(1,1),RLSE)              
//LISTAR1  DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBFFR12,             
//        DISP=(MOD,DELETE,DELETE),SPACE=(TRK,(1,1),RLSE)              
//*--------------------------------------------------------------------
//* PASO PARA SACAR LISTA DE FICHEROS RECIBIDOS                       *
//*--------------------------------------------------------------------
//ZTBGLFE EXEC PGM=ZTBGBLFE,REGION=4M,COND=(0,NE),                     
//             PARM='&ORIGEN&FUNCION&L1&L2&R1&R2&PR&AP/CBLQDA(ON)'     
//STEPLIB   DD DSN=KI.EIDA.LOAD,DISP=SHR                               
//          DD DSN=KI.EIDC.LOAD,DISP=SHR                               
//ZTBGFLOG  DD SYSOUT=*                                                
//ZTBGFPRI  DD SYSOUT=*,DCB=(BLKSIZE=105)                              
//SYSOUT    DD SYSOUT=*                                                 
//ZTBGFLFE  DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBGFLFE,            
//             DISP=(NEW,CATLG,DELETE),                                
//             SPACE=(TRK,(5,1),RLSE),                                 
//             DCB=(RECFM=FB,LRECL=200,BLKSIZE=0,DSORG=PS)             
//*--------------------------------------------------------------------
//PASSORT  EXEC PGM=SORT,COND=(0,NE)                                   
//SORTIN    DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBGFLFE,DISP=SHR    
//SORTOUT   DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBFFLFT,            
//             DISP=(NEW,PASS,DELETE),                                 
//             DCB=(RECFM=FB,LRECL=200,BLKSIZE=0),                     
//             SPACE=(TRK,(1,1),RLSE)                                  
//SYSOUT    DD SYSOUT=*                                                
//SYSABOUT  DD SYSOUT=*                                                
//SYSIN     DD DSN=KI.EIDC.ZTBG.JCLS(SORTFF),DISP=SHR                
//*--------------------------------------------------------------------
//* PASO01- PASO DE VERIF.FIRMA                                        
//* SI LEE LA SESION Y NO SE TRATA DE SESION FF, ACABA CON RC=01       
//*--------------------------------------------------------------------
//PASO01   EXEC PGM=ZTBFBEFF,COND=(0,NE),                              
//         PARM='&ORIGEN&FUNCION&L1&L2&R1&R2&AP&FV/CBLQDA(ON)',     
//         REGION=0M,TIME=1440                                          
//STEPLIB  DD DSN=KI.EIDA.LOAD,DISP=SHR                               
//         DD DSN=KI.EIDC.LOAD,DISP=SHR                                
//ZTBGFLIS DD SYSOUT=*                                                 
//ZTBGFMSJ DD SYSOUT=*                                                 
//ZTBGFPRI DD SYSOUT=*,DCB=(BLKSIZE=105)                               
//ZTBFFLOG DD SYSOUT=*                                                 
//SYSTCPD  DD DSN=SW.TCPIP.SEZAPARM(TCPDATAB),DISP=SHR                 
//SYSOUT   DD SYSOUT=*                                                 
//SYSPRINT DD   SYSOUT=*,OUTLIM=999999                                 
//CEEDUMP  DD SYSOUT=*                                                 
//ZTBGFLFE DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBFFLFT,DISP=SHR     
//ZTBFFLF2 DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBFFLF2,             
//         DISP=(NEW,CATLG,DELETE),                                    
//         SPACE=(TRK,(1,1),RLSE),                                      
//         DCB=(RECFM=FB,LRECL=300,BLKSIZE=0,DSORG=PS)                 
//ZTBFFSAL DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBFFSAL,             
//         DISP=(NEW,CATLG,DELETE),                                    
//         SPACE=(TRK,(1,1),RLSE),                                     
//         DCB=(RECFM=FB,LRECL=300,BLKSIZE=0,DSORG=PS)                 
//ZTBFFP12 DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBFFR12,             
//         DISP=(NEW,CATLG,DELETE),                                    
//         DCB=(RECFM=FB,LRECL=80,BLKSIZE=80),                         
//         SPACE=(TRK,(1,1),RLSE)                                       
//*                                                                    
//*--------------------------------------------------------------------
//* PASO02- PASO DE FORMATEADO DE FICHERO                              
//*--------------------------------------------------------------------
//* IF (PASO01.RC>2) THEN                                              
//* INBORR1  EXEC PGM=IEFBR14                                          
//* LISTAFF  DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBGFLFE,           
//*         DISP=(OLD,DELETE,DELETE)                                   
//* ENDIF                                                              
//PASO02   EXEC PGM=ZTBFBR12,PARM='/CBLQDA(ON)',                       
//         REGION=0M,TIME=1440,COND=(0,NE)                             
//STEPLIB  DD DSN=IMSP.SDFSRESL,DISP=SHR                               
//         DD DSN=KI.EIDA.LOAD,DISP=SHR                                
//         DD DSN=KI.EIDC.LOAD,DISP=SHR                                
//ZTBGFTCO DD DSN=KI.EIDC.ZTBG.ZTBGFTCO,DISP=SHR                       
//ZTBGFLIS DD SYSOUT=*                                                 
//ZTBGFMSJ DD SYSOUT=*                                                  
//ZTBGFPRI DD SYSOUT=*,DCB=(BLKSIZE=105)                               
//ZTBFFLOG DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 
//CEEDUMP  DD SYSOUT=*                                                 
//ZTBFFLF2 DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBFFLF2,DISP=SHR     
//ZTBFFSAL DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBFFSAL,             
//         DISP=SHR                                                    
//ZTBGFLFE DD SYSOUT=*                                                 
//SYSIN    DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBFFR12,DISP=SHR     
//*ENDIF                                                                
//*                                                                    
// IF (PASO02.RC=0) THEN                                               
//INBORR2  EXEC PGM=IEFBR14                                            
//LISTAF2  DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBFFLF2,             
//         DISP=(OLD,DELETE,DELETE)                                    
// ENDIF                                                               
//*                                                                     
// IF (PASO02.RC=0) THEN                                               
//INBORR3  EXEC PGM=IEFBR14                                            
//LISTAFS  DD DSN=KI.EIDC.&L0..R&R1..R&R2..A&PR..ZTBFFR12,             
//         DISP=(OLD,DELETE,DELETE)                                    
// ENDIF                                                               
```

&#x20;Los resultados más significativos con los que pueden finalizar los procesos de tratamiento de firma son:

<table data-header-hidden><thead><tr><th width="77.7037353515625" valign="top"></th><th width="708.814697265625" valign="top"></th></tr></thead><tbody><tr><td valign="top">RDO</td><td valign="top">Comentario</td></tr><tr><td valign="top">01</td><td valign="top">Verificación de firma  con errores, se debe revisar el fichero ZTBFFSAL</td></tr><tr><td valign="top">06</td><td valign="top">No se requiere realizar el proceso de adaptación de ficheros</td></tr><tr><td valign="top">08</td><td valign="top">Error en verificación de firma: DOCUMENTO MODIFICADO</td></tr><tr><td valign="top">13</td><td valign="top">Error al abrir un fichero en MVS</td></tr><tr><td valign="top">14</td><td valign="top">Error al cerrar un fichero en MVS</td></tr><tr><td valign="top">15</td><td valign="top">Error al leer un fichero en MVS</td></tr><tr><td valign="top">16</td><td valign="top">Error al escribir en un fichero en MVS</td></tr><tr><td valign="top">17</td><td valign="top">Error al rescribir en un fichero en MVS</td></tr><tr><td valign="top">18</td><td valign="top">Error al borrar el fichero</td></tr><tr><td valign="top">19</td><td valign="top">Error al alocar un fichero</td></tr><tr><td valign="top">20</td><td valign="top">Error al desalocar un fichero</td></tr><tr><td valign="top">21</td><td valign="top">Parámetros de entrada incorrectos</td></tr><tr><td valign="top">23</td><td valign="top">No hay ningún fichero de aplicación catalogado.</td></tr><tr><td valign="top">24</td><td valign="top">Número de ficheros de aplicación excede del máximo permitido</td></tr><tr><td valign="top">25</td><td valign="top">Fichero de aplicación no catalogado.</td></tr><tr><td valign="top">26</td><td valign="top">No existe registro de entorno en EDITRAN/FF</td></tr><tr><td valign="top">27</td><td valign="top">No existe aplicación en EDITRAN/FF</td></tr><tr><td valign="top">28</td><td valign="top">No existe sesión de presentación en EDITRAN/G</td></tr><tr><td valign="top">37</td><td valign="top"><p>Error en el servicio de firma.</p><p>Posible error de comunicación (revise mensajes en SYSOUT)</p></td></tr><tr><td valign="top">38</td><td valign="top">La aplicación de envío de ficheros firmados no tiene asociado ningún usuario que pueda firmar</td></tr><tr><td valign="top">39</td><td valign="top">Lista de ficheros de entrada vacía.</td></tr><tr><td valign="top">42</td><td valign="top">Error de catalogación</td></tr><tr><td valign="top">43</td><td valign="top">No existen usuarios locales que puedan firmar los envíos</td></tr><tr><td valign="top">45</td><td valign="top">Error en el proceso servidor al generar la firma</td></tr><tr><td valign="top">46</td><td valign="top">Error en el proceso servidor al validar la firma</td></tr><tr><td valign="top">47</td><td valign="top">Error al validar la firma</td></tr><tr><td valign="top">48</td><td valign="top">No se han encontrado todos los signatarios requeridos</td></tr><tr><td valign="top">49</td><td valign="top">No se han implementado reglas de validación de firmantes</td></tr><tr><td valign="top">51</td><td valign="top">Con tipo de firma ‘D’, no encuentra el fichero de Datos</td></tr><tr><td valign="top">52</td><td valign="top">Con tipo de firma ‘D’, no encuentra el fichero de Firma</td></tr><tr><td valign="top">53</td><td valign="top">No se puede realizar contrafirma en modo PKCS#7</td></tr><tr><td valign="top">55</td><td valign="top">Parámetro delimitadores erróneo en aplicación EDITRAN/FF</td></tr><tr><td valign="top">56</td><td valign="top">Error delimitadores de registro no coinciden</td></tr><tr><td valign="top">58</td><td valign="top">Errores en la configuración del perfil de aplicación EDITRAN/FF</td></tr><tr><td valign="top">61</td><td valign="top">No existe usuario local para realizar la contrafirma</td></tr><tr><td valign="top">65</td><td valign="top">El fichero de aplicación existe y no está permitido borrarlo</td></tr></tbody></table>

### JCL - Incorporación del DN Remoto o path  <a href="#incorporacion-del-dn-remoto" id="incorporacion-del-dn-remoto"></a>

Para facilitar la cumplimentación del DN de un certificado remoto o el path donde se encuentra el certificado publico(.cer), que actualmente se realiza a través de la pantalla, se ha creado un JCL que lo incorpora desde un fichero que lo contenga, ZTBFJCDN.

<a class="button secondary">Copiar</a>

```
//KI63A23A JOB (EGDI,KIT,,99),'EDITRAN/FF ',MSGCLASS=H,CLASS=A,         
//            NOTIFY=&SYSUID                                            
//********************************************************************* 
//* PGM QUE LANZA EL PGM ZTBFBCDN - ALTA/MODIFICA DE PERFIL USUARIO   * 
//********************************************************************* 
//*DATOS DE SYSIN-ESTRUCTURA EEEEEEEEE-UUUUUUUUUUUUUUU-T                
//*EEEEEEEEE:NIF ENTIDAD                                                
//*SEPARADOR DE UNA POSICION(-)                                         
//*UUUUUUUUUUUUUUU: USUARIO REMOTO                                      
//*SEPARADOR DE UNA POSICION(-)                                         
//*T: TIPO DE IDENTIFICACION (D-DN O P-PATH).EN CASO DE no INFORMAR EL  
//*VALOR POR DEFECTO SERA D-DN                                          
//********************************************************************* 
//*  DATOS: PROGRAMA AL QUE SE LLAMARá PARA HACER ALTA/MODIFIACION DEL  
//*         PERFIL DE USUARIO: - CICS                                   
//********************************************************************* 
//ZTBFBCDN  EXEC PGM=ZTBFBCDN,REGION=0M                                 
//STEPLIB   DD DSN=KI.EIDA.LOAD,DISP=SHR                                
//          DD DSN=KI.EIDC.ZTBG.LOAD,DISP=SHR                           
//          DD DSN=KI.EGDC.ZTBP.LOAD31,DISP=SHR                         
//          DD DSN=CICSTS53.CICS.SDFHEXCI,DISP=SHR                      
//ZTBFFPE   DD DSN=KI.EIDC.ZTBG.ZTBFFPER,DISP=SHR                       
//ZTBPFPE   DD DSN=KI.EGDC.ZTBP.ZTBPFPE,DISP=SHR                        
//ZTBFFCDN  DD DSN=KI.EIDA.DN.CICS,DISP=SHR                             
//SYSOUT    DD SYSOUT=*                                                 
//SYSPRINT  DD SYSOUT=*                                                 
//PRINTDD   DD SYSOUT=*                                                 
//SYSIN     DD *                
000099940-USUARIOREMOTO01-D     
//*                                      
```

Los datos de entrada son:

* SYSIN: Código Remoto y nombre del Usuario Remoto propietario del certificado
* Fichero que contiene el DN o path donde se encuentra el certificado publico en el USS. Formato FB y longitud de registro 350 (ZTBFFCDN).

Este fichero es el que se proporcionará en el script obtén\_dn.sh para guardar el DN del certificado.

## Fichero de salida a la aplicación <a href="#toc199404900" id="toc199404900"></a>

Se crea fichero (ZTBFFSAL) FB de 300. Indicará como fue la verificación de firmas para cada fichero recibido, así como características de las firmas. Tiene 2 tipos de registros:&#x20;

<table data-header-hidden><thead><tr><th width="64.0616455078125" valign="top"></th><th width="170" valign="top"></th><th width="71.2469482421875" valign="top"></th><th width="74.8271484375" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Nivel</td><td valign="top">Nombre</td><td valign="top">Long.</td><td valign="top">Fmto.</td><td valign="top">Descripción</td></tr><tr><td valign="top">1</td><td valign="top">Registro ZTBFFSAL</td><td valign="top"> </td><td valign="top">alfn.</td><td valign="top">Registros de TIPO 01.</td></tr><tr><td valign="top"> </td><td valign="top"> </td><td valign="top"> </td><td valign="top"> </td><td valign="top"> </td></tr><tr><td valign="top">2</td><td valign="top">Tipo de registros</td><td valign="top">2</td><td valign="top">Alfn</td><td valign="top">01-Registros referentes a ficheros tratados y a su resultado de validación</td></tr><tr><td valign="top">2</td><td valign="top">Dos puntos</td><td valign="top">1</td><td valign="top">Alfn</td><td valign="top">Valor: ‘:’</td></tr><tr><td valign="top">2</td><td valign="top">Código de retorno</td><td valign="top">4</td><td valign="top">Num</td><td valign="top"><p>0000- Verificación de la firma correctamente</p><p>0012- Autoridad certificadora no válida</p><p>0013- Certificado(s) revocado(s). No implementado aún</p><p>0014- Certificado(s) caducado(2)</p><p>0015- Documento modificado</p><p>0016- Firmante(s) no autorizado(s) en la cuenta según los perfiles proporcionados en el administrador de Editran/FF</p></td></tr><tr><td valign="top">2</td><td valign="top">Dos puntos</td><td valign="top">1</td><td valign="top">Alfn</td><td valign="top">Valor: ‘:’</td></tr><tr><td valign="top">2</td><td valign="top">Dsname Formateado final</td><td valign="top">44</td><td valign="top">Alfn.</td><td valign="top">Dsname del fichero formateado y traducido final, a tratar por la aplicación.</td></tr><tr><td valign="top">2</td><td valign="top">Dos puntos</td><td valign="top">1</td><td valign="top">Alfn</td><td valign="top">Valor: ‘:’</td></tr><tr><td valign="top">2</td><td valign="top">Dsname descargado ASCII</td><td valign="top">44</td><td valign="top">Alfn.</td><td valign="top">Dsname del fichero ASCII, extraído del XML y con las firmas también extraídas.</td></tr><tr><td valign="top">2</td><td valign="top">Dos puntos</td><td valign="top">1</td><td valign="top">Alfn</td><td valign="top">Valor: ‘:’</td></tr><tr><td valign="top">2</td><td valign="top">Dsname descargado por Editran</td><td valign="top">44</td><td valign="top">Alfn.</td><td valign="top">Dsname del fichero descargado por Editran, cuyo contenido es el XML que se ha tratado.</td></tr><tr><td valign="top">2</td><td valign="top">Dos puntos</td><td valign="top">1</td><td valign="top">Alfn</td><td valign="top">Valor: ‘:’</td></tr><tr><td valign="top">2</td><td valign="top">Mensaje de error</td><td valign="top">80</td><td valign="top">Alfn</td><td valign="top"><p>Mensaje</p><p>Si rc=0000, Proceso de firma correcto (sin mensaje)</p><p>Si rc=xxxx, mensaje de error oportuno</p></td></tr><tr><td valign="top">2</td><td valign="top">Area reserva</td><td valign="top">77</td><td valign="top">Alfn</td><td valign="top">Area de reserva</td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="65.04931640625" valign="top"></th><th width="170" valign="top"></th><th width="69.25927734375" valign="top"></th><th width="77.7901611328125" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Nivel</td><td valign="top">Nombre</td><td valign="top">Long.</td><td valign="top">Fmto.</td><td valign="top">Descripción</td></tr><tr><td valign="top">1</td><td valign="top">Registro ZTBFFSAL</td><td valign="top"> </td><td valign="top">alfn.</td><td valign="top">Registros de TIPO 02.</td></tr><tr><td valign="top"> </td><td valign="top"> </td><td valign="top"> </td><td valign="top"> </td><td valign="top"> </td></tr><tr><td valign="top">2</td><td valign="top">Tipo de registros</td><td valign="top">2</td><td valign="top">Alfn</td><td valign="top">02-Registros referentes a firmantes por fichero. Por cada registro tipo 1, habrá tantos registros de tipo 2, como firmantes contenga el fichero firmado.</td></tr><tr><td valign="top">2</td><td valign="top">Dos puntos</td><td valign="top">1</td><td valign="top">Alfn</td><td valign="top">Valor: ‘:’</td></tr><tr><td valign="top">2</td><td valign="top">Area de reserva</td><td valign="top">4</td><td valign="top">Alfn</td><td valign="top"> </td></tr><tr><td valign="top">2</td><td valign="top">Dos puntos</td><td valign="top">1</td><td valign="top">Alfn</td><td valign="top">Valor: ‘:’</td></tr><tr><td valign="top">2</td><td valign="top">Dsname Formateado final</td><td valign="top">44</td><td valign="top">Alfn.</td><td valign="top">Dsname del fichero formateado y traducido final, a tratar por la aplicación.</td></tr><tr><td valign="top">2</td><td valign="top">Dos puntos</td><td valign="top">1</td><td valign="top">Alfn</td><td valign="top">Valor: ‘:’</td></tr><tr><td valign="top">2</td><td valign="top">Datos del DN firmante</td><td valign="top">247</td><td valign="top">Alfn.</td><td valign="top">Ejem:CN=Apellidos y el nombre del firmante, luego hay un espacio, un guión, otro espacio y el número de DNI de la persona escrito siempre con 9 caracteres (8 dígitos + letra)</td></tr><tr><td valign="top">2</td><td valign="top">Filler</td><td valign="top">109</td><td valign="top">Alfn</td><td valign="top">Area de reserva</td></tr></tbody></table>

## Fichero de salida JSON

Se crea fichero (ZTBFFJSN) VB de 396.  Este fichero es el resultado de la recepción de una presentación. La información que contiene es referente a dicha recepción. Por tanto, vendrá informada la aplicación (sesión de presentación), el número de firmas obligatorias, los grupos y los usuarios.

La nomenclatura del fichero es la siguiente:

PrefInstalacion.JobName.JobId.BRx. ZTBFFJSN&#x20;

<table data-header-hidden><thead><tr><th width="62.08642578125" valign="top"></th><th width="143.345703125" valign="top"></th><th width="81.234619140625" valign="top"></th><th width="81.851806640625" valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top">Nivel</td><td valign="top">KI</td><td valign="top">Long.</td><td valign="top">Fmto.</td><td valign="top">Descripción</td></tr><tr><td valign="top"> </td><td valign="top">PrefInstalacion</td><td valign="top">11</td><td valign="top">Alfn.</td><td valign="top">Es el prefijo de la instalación del entorno local de  EDITRAN/FF</td></tr><tr><td valign="top"> </td><td valign="top">JobName</td><td valign="top">8</td><td valign="top">Alfn.</td><td valign="top">Nombre del JOB (e.: KIEDRCT7)</td></tr><tr><td valign="top"> </td><td valign="top">JobId</td><td valign="top">8</td><td valign="top">Alfn.</td><td valign="top">Id del JOB que se lanza (ej. JOB03039)</td></tr><tr><td valign="top"> </td><td valign="top">BRx</td><td valign="top">3</td><td valign="top">Alfn.</td><td valign="top"><p>La x puede tomar tres valores diferentes 1, 2 o 3 dependiendo del modo de firma:</p><p>1. Attached</p><p>2.Detached</p><p>3.Concatenado</p><p> </p></td></tr></tbody></table>


---

# 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/firma-electronica/funciones-batch.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.
