> 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-comun-z-os/interfaz-generica-de-aplicacion/jcls-de-servicio/fichero-de-ficheros-emitidos-y-recibidos.md).

# Fichero de ficheros emitidos y recibidos

En el posterior a emisión, ZTBGP3, o en el posterior a recepción ZTBGP4, se ha introducido un segundo paso, a voluntad del operador, que llamando a un programa nuevo (ZTBGBLFE), generaría un fichero cuyo contenido son los ficheros emitidos o recibidos.

```cobol
//ZTBGLFE EXEC PGM=ZTBGBLFE,                       
//        PARM='&ORIGEN&FUNCION&L1&L2&R1&R2&AP',   
//        REGION=4M                                
//STEPLIB  DD   DSN=KI.EIDC.ZTBG.LOAD,DISP=SHR     
//ZTBGFPER DD   DSN=KI.EIDC.ZTBG.ZTBGFPER,DISP=SHR 
//ZTBGFEST DD   DSN=KI.EIDC.ZTBG.ZTBGFEST,DISP=SHR 
//ZTBGFLFE DD   SYSOUT=*                           
//ZTBGFPRI DD   SYSOUT=*,DCB=(BLKSIZE=105)         
//SYSOUT   DD   SYSOUT=*                            
//SYSPRINT DD   SYSOUT=*                           
//SYSDBOUT DD   SYSOUT=*                           
//ABENDAID DD   SYSOUT=*                           
//SYSUDUMP DD   SYSOUT=*                           
//SYSABOUT DD   SYSOUT=*                            
//*
```

Igualmente se ha creado un JCL independiente del procedimiento, ZTBGJFLE:

```cobol
//KI0F6AE3 JOB (EGDC,KIT,,99),'IGA-EDITRAN',MSGCLASS=H,CLASS=A,        
//             NOTIFY=&SYSUID                                          
//*********************************************************************
//* JCL PARA SACAR LISTA DE FICHEROS EMITIDOS - RECIBIDOS             * 
//*********************************************************************
//*  DATOS:                                                           *
//*   ORIGEN --------------------------------------------> 1 BYTE     *
//*       A  - PETICION CON SESION DE TRANSMISION INCLUIDA            *
//*       E-O- PETICION CON SESION DE PRESENTACION INCLUIDA           *
//*   FUNCION -------------------------------------------> 2 BYTES    *
//*       00 - SACA LA LISTA INDEPENDIENTEMENTE DE ESTADO PRESENTACION*
//*       02 - SACA LA LISTA SI EL EST.EMI DE PRESENTACION ES FINALIZ. *
//*       07 - SACA LA LISTA SI EL EST.REC DE PRESENTACION ES FINALIZ. *
//*   SES. PRESENT. O SES. TRANSM.(DEPENDIENDO DE ORIGEN)> 24 BYTES   *
//*       LOCAL0 -------------------------------------------> 3 BYTES *
//*       LOCAL1 -------------------------------------------> 6 BYTES *
//*       LOCAL2 -------------------------------------------> 3 BYTES *
//*       REMOTO1-------------------------------------------> 6 BYTES *
//*       REMOTO2-------------------------------------------> 3 BYTES *
//*       APLICA -------------------------------------------> 6 BYTES *
//*********************************************************************
//PASO01  EXEC PGM=ZTBGBLFE,                                           
//        PARM='A02000099940000099990MARIAJ',                          
//        REGION=4M                                                    
//STEPLIB  DD   DSN=KI.EIDC.ZTBG.LOAD,DISP=SHR                         
//*                                                                     
//ZTBGFPER DD   DSN=KI.EIDC.ZTBG.ZTBGFPER,DISP=SHR                     
//ZTBGFEST DD   DSN=KI.EIDC.ZTBG.ZTBGFEST,DISP=SHR                     
//ZTBGFLFE DD   SYSOUT=*                                               
//ZTBGFPRI DD   SYSOUT=*,DCB=(BLKSIZE=105)                             
//SYSOUT   DD   SYSOUT=*                                               
//SYSPRINT DD   SYSOUT=*                                               
//SYSDBOUT DD   SYSOUT=*                                               
//ABENDAID DD   SYSOUT=*                                               
//SYSUDUMP DD   SYSOUT=*                                               
//SYSABOUT DD   SYSOUT=*                                                
//*
```

El contenido de los campos es: Origen = ‘x’, Función = ‘yy’, L1 + L2 = ‘Cgo. local’, R1 + R2 = ‘Cgo. remoto’, AP = ‘Aplicación’.

Origen puede tener los siguientes valores:

* ‘A’ : La petición viene de la aplicación. En éste caso, la sesión (L1-L2-R1-R2-AP) es la sesión de presentación.
* ‘O’ : La petición viene de operador. En éste caso, la sesión (L1-L2-R1-R2-AP) es la sesión de presentación.
* ‘E’ : La petición viene del módulo de transmisión de Editran. En éste caso, la sesión (L1-L2-R1-R2-AP) es una de las sesiones de transmisión asociada a la presentación.

Función puede tener los siguientes valores:

* ‘00’ : Se desea sacar un fichero independientemente del estado de la presentación.
* ‘02’: Procesar posterior a emisión. Sólo creará el fichero si el estado de la presentación es 005 (Finalizado)
* ‘05’: Interrumpir presentación de emisión. No se crea fichero.
* ‘07’: Procesar posterior a recepción. Sólo creará el fichero si el estado de la presentación es 104 (Finalizado)
* ‘09’: Interrumpir presentación de recepción. No se crea fichero.

Ejemplos:

1. Sacar todos los ficheros asociados a la presentación 00009994000009990TELECA,

```
PARM='A00000099940000099990TELECA' 
PARM='O00000099940000099990TELECA'
```

2. Sacar todos los ficheros asociados a la transmisión 00009994000009990PRUEBA

```
PARM='E00000099940000099990PRUEBA'
```

3. Sacar todos los ficheros asociados a la presentación 00009994000009990TELECA, siempre y cuando el estado de la presentación sea FINALIZADO:

```
PARM='A02000099940000099990TELECA' 
PARM='O02000099940000099990TELECA'
```

4. Sacar todos los ficheros asociados a la transmisión 00009994000009990PRUEBA, siempre y cuando el estado de la presentación a la que pertenece dicha sesión de transmisión sea FINALIZADO

```
PARM='E02000099940000099990PRUEBA'
```

El contenido del fichero ZTBGFLFE es el siguiente:

<table data-header-hidden><thead><tr><th width="63.07403564453125" valign="top"></th><th width="140.3826904296875" valign="top"></th><th width="74.3333740234375" valign="top"></th><th width="69.0740966796875" 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">Tipo</td><td valign="top">Descripción</td></tr><tr><td valign="top">1</td><td valign="top">Área de fichero</td><td valign="top">130</td><td valign="top">Alfn.</td><td valign="top"></td></tr><tr><td valign="top">2</td><td valign="top">Nombre físico</td><td valign="top">44</td><td valign="top">Alfn.</td><td valign="top">Nombre físico del fichero de aplicación</td></tr><tr><td valign="top">2</td><td valign="top">Filler</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">Guion de separación</td></tr><tr><td valign="top">2</td><td valign="top">Fecha-fin-presentación</td><td valign="top">14</td><td valign="top">Núm.</td><td valign="top">Fecha-Hora de fin de presentación en formato AAAAMMDDHHMMSS</td></tr><tr><td valign="top">2</td><td valign="top">Tipo-Fichero cargado</td><td valign="top">4</td><td valign="top">Núm.</td><td valign="top"><p>Tipo de fichero cargado o de salida</p><p>‘FIJO’</p><p>‘VBLE’</p><p>‘VEXP’</p><p>‘BINA’</p></td></tr><tr><td valign="top">2</td><td valign="top">Alfabeto-datos cargados</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top"><p>Alfabeto de los datos cargados:</p><p>‘A’: Ascii, ‘E’: Ebcdic, ‘B’:Binario</p></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"><p>Indica si el fichero fue cargado con compresión:</p><p>‘F’ Comprimido, ‘N’ Sin compresión</p></td></tr><tr><td valign="top">2</td><td valign="top">Filler</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top">Área de reserva</td></tr><tr><td valign="top">2</td><td valign="top">Nombre físico origen</td><td valign="top">75</td><td valign="top">Alfn.</td><td valign="top">Nombre físico del fichero de aplicación en origen</td></tr><tr><td valign="top">2</td><td valign="top">Bytes fich.aplic</td><td valign="top">12</td><td valign="top">Núm.</td><td valign="top">Bytes fichero aplicación</td></tr><tr><td valign="top">2</td><td valign="top">Longitud de reg.</td><td valign="top">6</td><td valign="top">Núm.</td><td valign="top">Lrecl.</td></tr><tr><td valign="top">2</td><td valign="top">Filler</td><td valign="top">41</td><td valign="top">Alfn.</td><td valign="top">Área de reserva</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/ibm-editran-v5.3-comun-z-os/interfaz-generica-de-aplicacion/jcls-de-servicio/fichero-de-ficheros-emitidos-y-recibidos.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.
