> 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/funciones-invocadas-desde-jcl-de-aplicacion/peticiones-genericas-de-onesait-editran-g.md).

# Peticiones genéricas de Onesait Editran /G

Se ha implementado la posibilidad de que a través de un único JCL, se puedan lanzar peticiones genéricas contra múltiples sesiones, de forma que se pueda encadenar dicho JCL a los planificadores de la instalación y realicen las operaciones habituales de los operadores de Editran. Las peticiones pueden hacerse a partir de un fichero de peticiones previamente creado o a través de SYSIN en el propio JCL.

El JCL proporcionado es ZTBGJPET, el cual llama al programa ZTBGBPET, que actúa leyendo FICHAS, en donde encuentra los parámetros necesarios. Estos son:

<table data-header-hidden><thead><tr><th width="62.08642578125" valign="top"></th><th width="118.65435791015625" valign="top"></th><th width="74.43206787109375" valign="top"></th><th width="79.08642578125" 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">Parámetros</td><td valign="top">80</td><td valign="top"></td><td valign="top"></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">Espacios. Si su valor es * se ignora.</td></tr><tr><td valign="top">2</td><td valign="top">Función</td><td valign="top">2</td><td valign="top">Núm.</td><td valign="top"><p>Función:</p><p>01- Carga</p><p>02- Procesar presentación posterior a emisión.</p><p>03- Emitir presentación</p><p>05- Interrumpir presentación de emisión.</p><p>06- Inicializar presentación de recepción.</p><p>07- Descargar presentación de recepción.</p><p>08- Recibir presentación.</p><p>09- Interrumpir presentación de recepción.</p><p>10- Inicialización de estados.</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">Guion de separación</td></tr><tr><td valign="top">2</td><td valign="top">Recurso</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top"><p>Recurso del cual el programa saca las sesiones</p><p>F – Fichero</p><p>J – JCL.</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">Guion de separación</td></tr><tr><td valign="top">2</td><td valign="top">Sentido</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top"><p>(Sólo necesario con función 10):</p><p>E – Emisión.</p><p>R – Recepción.</p></td></tr><tr><td valign="top">2</td><td valign="top">Filler</td><td valign="top">73</td><td valign="top">Alfn.</td><td valign="top">Área de reserva a espacios</td></tr></tbody></table>

Las sesiones se pueden especificar a continuación de esta ficha (si se indicó Recurso J), o, en el fichero PETICION (fijo de 80 posiciones), si se indicó Recurso F. Se especificará lo siguiente:

<table data-header-hidden><thead><tr><th width="67.02459716796875" valign="top"></th><th width="123.58026123046875" valign="top"></th><th width="67.4691162109375" valign="top"></th><th width="71.1605224609375" 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">Sesión</td><td valign="top">80</td><td valign="top"></td><td valign="top"></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">Espacios. Si su valor es * se ignora.</td></tr><tr><td valign="top">2</td><td valign="top">Origen presentación</td><td valign="top">9</td><td valign="top">Alfn.</td><td valign="top">Origen de la presentación (ceros para que la petición se realice contra todos los Cgo. origen posibles).</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">Destino presentación</td><td valign="top">9</td><td valign="top">Alfn.</td><td valign="top">Destino de la presentación (ceros para que la petición se realice contra todos los Cgo. remotos).</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">Aplicación</td><td valign="top">6</td><td valign="top">Alfn.</td><td valign="top">Aplicación (ceros para cualquier 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">Utilizar lista ficheros</td><td valign="top">1</td><td valign="top">Alfn.</td><td valign="top"><p>S/N. Optativo en la carga(ZTBGB110).</p><p>Indica si se desea utilizar lista de ficheros (ZTBGFCAR), para cargar los ficheros de aplicación.</p><p>En caso de que se ponga S, se cargará la lista de ficheros en vez de lo que ponga en los perfiles. Si no hay nada en perfiles, casca.</p><p>En caso de N o nada, se carga lo que ponga el perfil. Si este no tiene nada, se carga la lista de ficheros.</p></td></tr><tr><td valign="top">2</td><td valign="top">Filler</td><td valign="top">51</td><td valign="top">Alfn.</td><td valign="top">Área de reserva a espacios</td></tr></tbody></table>

El JCL quedaría como sigue:

```cobol
//KI0EEC03 JOB (EGDC,KIT,,99),'PET-MASIVAS',MSGCLASS=H,CLASS=A,        
//             NOTIFY=&SYSUID                                          
//*********************************************************************
//* INDRA, S.A.- SOL. COMUNICACIONES                       JUN. 2001  *
//*********************************************************************
//*********************************************************************
//*   PETICIONES GENERICAS.                                             
//**********************************************************************
//*FORMATO DE PRIMERA FICHA DEL JCL (SEPARADOS POR GUIONES).             
//*                                                                     
//*FF-R-S   : FF -> FUNCION : 01 CARGA                                 
//*                           02 PROCESAR PRESENTACION POSTERIOR EMISION
//*                           03 EMITIR PRESENTACION                   
//*                           05 INTERRUMPIR PRESENTACION DE EMISION   
//*                           06 INICIALIZAR PRESENTACION RECEPCION    
//*                           07 DESCARGAR PRESENTACION DE RECEPCION   
//*                           08 RECIBIR PRESENTACION                  
//*                           09 INTERRUMPIR PRESENTACION DE RECEPCION 
//*                           10 INICIALIZACION DE ESTADOS             
//*                                                                    
//*         : R  -> RECURSO : ( DE DONDE TOMA EL PROGRAMA LAS SESIONES)
//*                           F FICHERO                                
//*                           J JCL                                    
//*                                                                     
//*         : S  -> SENTIDO :  (SOLO CUANDO LA FUNCION SEA = 10)       
//*                           E EMISION                                
//*                           R RECEPCION                 
//*FORMATO DE LAS SIGUIENTES FICHAS DEL JCL (SEPARADOS POR GUIONES)   
//*         : ORIGEN (9 OCTETOS)                                      
//*         : DESTINO(9 OCTETOS)                                      
//*         : APLICACION (6 OCTETOS)                                   
//*      LISTA FICHEROS (S/N) (OPTATIVO) (1 OCTETO)                   
//*       -INDICA SI SE DESEA UTILIZAR PARA LA CARGA UNA LISTA QUE    
//*        CONTIENE LOS FICHEROS DE APLICACION (ZTBGFCAR).            
//*       -SI NO LE LLEGA EL PARM AL PROG ZTBGB110,O LE LLEGA A N,    
//*        EL PROGRAMA DE CARGA, SACA LOS FICH.APLICACION DE PERFILES.
//*        SI NO EXISTEN FICH. EN PERFILES,BUSCA LOS MISMOS EN UNA    
//*        LISTA DE FICHEROS YA CREADA (ZTBGFCAR)                     
//*       -SI LF=S, EL PROGRAMA DE CARGA, SACA LOS FICH.APLICACION DE 
//*        UNA LISTA DE FICHEROS YA CREADA (ZTBGFCAR). SI NO EXISTE   
//*        DICHA LISTA, CASCA.                                          
//**********************************************************************
//ZTBGPET EXEC PGM=ZTBGBPET,REGION=8M                                  
//STEPLIB  DD DSN=KI.EIDC.ZTBG.LOAD,DISP=SHR                           
//         DD DSN=KI.GCDA.CIFRADO.LOAD,DISP=SHR                        
//*                                                                    
//ZTBGFPER DD   DSN=KI.EIDC.ZTBG.ZTBGFPER,DISP=SHR                     
//ZTBPFPE  DD   DSN=KI.EGDC.ZTBP.ZTBPFPE,DISP=SHR                      
//NXFDCLA  DD   DSN=KI.SGDC.SSASST.NXFDCLA,DISP=SHR                    
//ZTBGFLOG DD   DSN=KI.EIDC.ZTBG.ZTBGFLOG,DISP=SHR                     
//ZTBGFEST DD   DSN=KI.EIDC.ZTBG.ZTBGFEST,DISP=SHR                     
//ZTBEFMP  DD   DSN=KI.EGDC.ZTBE.ZTBEFMP,DISP=SHR                      
//ZTBEFMH  DD   DSN=KI.EGDC.ZTBE.ZTBEFMH,DISP=SHR                      
//ZTBEFMT  DD   DSN=KI.EGDC.ZTBE.ZTBEFMT,DISP=SHR 
//SYSOUT   DD   SYSOUT=*                          
//SYSPRINT DD   SYSOUT=*                          
//SYSDBOUT DD   SYSOUT=*                          
//ABENDAID DD   SYSOUT=*                          
//SYSUDUMP DD   SYSOUT=*                          
//SYSABOUT DD   SYSOUT=*                           
//PETICION DD   DSN=KI.EIDC.ZTBG.PETICION,DISP=SHR
//LISTADO  DD   SYSOUT=H,DCB=(BLKSIZE=132)        
//FICHAS   DD   *                                 
 10-J-R                                           
*                                                 
 000000000-A0009997A-PRUEBA-N                       
 000000000-000000000-GENERI-S                       
 000000000-A0009997A-APLICA                       
*                                                  
//*  
```


---

# 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/funciones-invocadas-desde-jcl-de-aplicacion/peticiones-genericas-de-onesait-editran-g.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.
