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

# File of sent and received files

In the post-issue job, ZTBGP3, or in the post-receipt job ZTBGP4, a second step has been introduced, at the operator's discretion, which, by calling a new program (ZTBGBLFE), would generate a file whose contents are the issued or received files.

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

Likewise, an independent JCL has been created from the procedure, ZTBGJFLE:

```cobol
//KI0F6AE3 JOB (EGDC,KIT,,99),'IGA-EDITRAN',MSGCLASS=H,CLASS=A,        
//             NOTIFY=&SYSUID                                          
//*********************************************************************
//* JCL TO OUTPUT LIST OF ISSUED - RECEIVED FILES                   * 
//*********************************************************************
//*   DATA:                                                           *
//*   ORIGIN --------------------------------------------> 1 BYTE     *
//*       A  - REQUEST WITH TRANSMISSION SESSION INCLUDED            *
//*       E-O- REQUEST WITH PRESENTATION SESSION INCLUDED             *
//*   FUNCTION -------------------------------------------> 2 BYTES    *
//*       00 - OUTPUT THE LIST REGARDLESS OF PRESENTATION STATUS      *
//*       02 - OUTPUT THE LIST IF THE PRESENTATION ISSUE STATUS IS FINALIZED *
//*       07 - OUTPUT THE LIST IF THE PRESENTATION RECEIPT STATUS IS FINALIZED *
//*   PRES. SES. OR TRANSM. SES. (DEPENDING ON ORIGIN)> 24 BYTES     *
//*       LOCAL0 -------------------------------------------> 3 BYTES *
//*       LOCAL1 -------------------------------------------> 6 BYTES *
//*       LOCAL2 -------------------------------------------> 3 BYTES *
//*       REMOTE1 ------------------------------------------> 6 BYTES *
//*       REMOTE2 ------------------------------------------> 3 BYTES *
//*       APPLIES ------------------------------------------> 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=*                                                
//*
```

The contents of the fields are: Origin = ‘x’, Function = ‘yy’, L1 + L2 = ‘Local account’, R1 + R2 = ‘Remote account’, AP = ‘Application’.

Origin can have the following values:

* ‘A’ : The request comes from the application. In this case, the session (L1-L2-R1-R2-AP) is the presentation session.
* ‘O’ : The request comes from the operator. In this case, the session (L1-L2-R1-R2-AP) is the presentation session.
* ‘E’ : The request comes from the Editran transmission module. In this case, the session (L1-L2-R1-R2-AP) is one of the transmission sessions associated with the presentation.

Function can have the following values:

* ‘00’ : You want to output a file regardless of the presentation status.
* ‘02’: Process post-issue. It will only create the file if the presentation status is 005 (Finalized)
* ‘05’: Interrupt issue presentation. No file is created.
* ‘07’: Process post-receipt. It will only create the file if the presentation status is 104 (Finalized)
* ‘09’: Interrupt receipt presentation. No file is created.

Examples:

1. Output all files associated with presentation 00009994000009990TELECA,

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

2. Output all files associated with transmission 00009994000009990PRUEBA

```
PARM='E00000099940000099990PRUEBA'
```

3. Output all files associated with presentation 00009994000009990TELECA, provided that the presentation status is FINALIZED:

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

4. Output all files associated with transmission 00009994000009990PRUEBA, provided that the status of the presentation to which that transmission session belongs is FINALIZED

```
PARM='E02000099940000099990PRUEBA'
```

The contents of file ZTBGFLFE are as follows:

<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">Level</td><td valign="top">Name</td><td valign="top">Length</td><td valign="top">Type</td><td valign="top">Description</td></tr><tr><td valign="top">1</td><td valign="top">File area</td><td valign="top">130</td><td valign="top">Alphan.</td><td valign="top"></td></tr><tr><td valign="top">2</td><td valign="top">Physical name</td><td valign="top">44</td><td valign="top">Alphan.</td><td valign="top">Physical name of the application file</td></tr><tr><td valign="top">2</td><td valign="top">Filler</td><td valign="top">1</td><td valign="top">Alphan.</td><td valign="top">Separator dash</td></tr><tr><td valign="top">2</td><td valign="top">Presentation-end date</td><td valign="top">14</td><td valign="top">No.</td><td valign="top">Presentation end date-time in YYYYMMDDHHMMSS format</td></tr><tr><td valign="top">2</td><td valign="top">Loaded file type</td><td valign="top">4</td><td valign="top">No.</td><td valign="top"><p>Type of loaded or output file</p><p>‘FIXED’</p><p>‘VBLE’</p><p>‘VEXP’</p><p>‘BINA’</p></td></tr><tr><td valign="top">2</td><td valign="top">Loaded data alphabet</td><td valign="top">1</td><td valign="top">Alphan.</td><td valign="top"><p>Alphabet of the loaded data:</p><p>‘A’: Ascii, ‘E’: Ebcdic, ‘B’: Binary</p></td></tr><tr><td valign="top">2</td><td valign="top">Compression</td><td valign="top">1</td><td valign="top">Alphan.</td><td valign="top"><p>Indicates whether the file was loaded with compression:</p><p>‘F’ Compressed, ‘N’ Uncompressed</p></td></tr><tr><td valign="top">2</td><td valign="top">Filler</td><td valign="top">1</td><td valign="top">Alphan.</td><td valign="top">Reserve area</td></tr><tr><td valign="top">2</td><td valign="top">Source physical name</td><td valign="top">75</td><td valign="top">Alphan.</td><td valign="top">Physical name of the application file at source</td></tr><tr><td valign="top">2</td><td valign="top">App file bytes</td><td valign="top">12</td><td valign="top">No.</td><td valign="top">Application file bytes</td></tr><tr><td valign="top">2</td><td valign="top">Record length</td><td valign="top">6</td><td valign="top">No.</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">Alphan.</td><td valign="top">Reserve area</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-en/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.
