> 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/funciones-invocadas-desde-jcl-de-aplicacion/tratamientos-de-ficheros-aplicacion-previos-posteriores-a-carga-descarga.md).

# Application file processing before-after load-unload

The possibility has been implemented so that once the presentation file has been successfully downloaded, it can be adapted to another format, translated, converted, and line breaks can be removed from an environment that uses them. This possibility also extends to the application files for transmission, before loading them (adapting them, translating them and converting them outside Editran). This process is carried out through JCL ZTBGJFF4. It consists of the following:

1. PARM. 3 different parameters are passed, separated by commas:

* Separators in hexadecimal to remove. Normally UNIX sends 2 characters x0A-x0D at the end of each line. There can be 3 cases:
  * There are no separators. 4 spaces octets are indicated
  * There is an x’YZ’ separator. In octet 1 Y is indicated, in octet 2 Z is indicated, and in the last 2 octets spaces are indicated.
  * There are two separators x’AB’ x’CD’. In octet 1 A is indicated, in octet 2 B is indicated, in octet 3 C is indicated and in octet 4 D is indicated.
* Translation. Supports the values: E (translate from ASCII to EBCDIC), A (translate from EBCDIC to ASCII) and N (do not translate).
* Conversion table. Name of the table in the conversion table file. If conversion is not wanted, spaces should be indicated.

2. Input. This is the name of the application file, as Editran left it after passing the subsequent one to reception.
3. Output. This is the name of the output application file once the changes have been made. Its format will depend on how it is defined.
4. ZTBGFTCO. This is the name of the conversion table file.
5. PASO002. Optional. It would delete the source application file if its adaptation is correct.

```cobol
//KI0F6AEA JOB (EGDC,KIT,,99),'EDITRAN-V40',MSGCLASS=H,CLASS=A, 
//            NOTIFY=&SYSUID              
//*********************************************************************
//*  ADAPTATION OF EDITRAN FILES. TRANSLATION AND CONVERSION INCLUDED.
//*  NOTE FOR FIXED OUTPUT FILES: IF LRECL IS GREATER THAN RECORD
//*       TO BE WRITTEN, IT IS FILLED WITH SPACES ON THE RIGHT.
//*  NOTE FOR FIXED INPUT AND VB OUTPUT FILES. PROBABLY, THE
//*       VB FILE SHOULD BE DEFINED 4 OCTETS LARGER THAN THE FIXED LRECL.
//*********************************************************************
//*  PARM VALUES:(XXXX,Y,ZZZZZZZZ) SEPARATED BY COMMAS:                                  
//*    XX = HEXADECIMAL CHARACTERS TO REMOVE (LINE FEED):
//*         - FOUR OCTETS OF SPACES: THERE ARE NO CHARACTERS TO REMOVE
//*         - TWO OCTETS INDICATING A HEXADECIMAL CHARACTER AND OTHER TWO
//*           TO SPACES. REMOVES THE CHARACTER DETERMINED IN HEXA
//*         - FOUR OCTETS INDICATING TWO HEXADECIMAL CHARACTERS.
//*           FOR EXAMPLE 0D0A): REMOVES THE TWO HEXADECIMAL X0D-X0A                                                
//*    Y  = 1 OCTET INDICATING WHETHER THE FILE ALPHABET WILL BE TRANSLATED
//*         SOURCE. POSSIBLE VALUES: 
//*         A(ASCII), E(EBCDIC), N(DO NOT TRANSLATE)                       
//*    ZZ = 9 OCTETS INDICATING THE NAME OF THE CONVERSION TABLE (WHICH 
//*         IS APPLIED AFTER TRANSLATING). WITH SPACES THERE IS NO CONVERSION TABLE
//*         IF OCTET 9 IS ‘A’ IT IS CONVERTED TO ASCII.
//*         IF OCTET 9 IS ‘E’ IT IS CONVERTED TO EBCDIC.
//*********************************************************************         
//PASO001  EXEC PGM=ZTBGBGFF4,PARM='0D0A,E,TABCVXNCE'    
//STEPLIB  DD DSN=KI.EIDC.ZTBG.LOAD,DISP=SHR 
//ZTBGFTCO DD DSN=KI.PMED.CZTB.ZTBGFTCO,DISP=SHR
//ENTRADA  DD DSN=PUNTERO.FICHERO.ORIGEN,DISP=SHR
//SALIDA   DD DSN=PUNTERO.FICHERO.FIJO244.DESTINO,
//         DCB=(RECFM=FB,LRECL=256,BLKSIZE=0,DSORG=PS),
//*        DCB=(RECFM=VB,LRECL=260,BLKSIZE=0,DSORG=PS)
//*        DCB=(RECFM=VS,LRECL=260,BLKSIZE=0,DSORG=PS)
//         DISP=(NEW,CATLG,DELETE),
//         SPACE=(TRK,(500,50),RLSE)
//SYSOUT   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSDBOUT DD SYSOUT=*
//ABENDAID DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSABOUT DD SYSOUT=*
//*
//PASO002  EXEC PGM=IDCAMS,COND=(0,NE,PASO001)
//SYSPRINT DD SYSOUT=*               
//SYSIN    DD   *                      
     DELETE (PUNTERO.FICHERO.ORIGEN) PURGE
//*
// 
```


---

# 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/funciones-invocadas-desde-jcl-de-aplicacion/tratamientos-de-ficheros-aplicacion-previos-posteriores-a-carga-descarga.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.
