> 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/peticiones-genericas-de-onesait-editran-g.md).

# Generic Onesait Editran /G requests

The ability has been implemented so that, through a single JCL, generic requests can be launched against multiple sessions, allowing this JCL to be chained to the installation schedulers so they perform the usual operations of the Editran operators. Requests can be made from a previously created request file or through SYSIN in the JCL itself.

The provided JCL is ZTBGJPET, which calls the program ZTBGBPET, which works by reading FICHAS, where it finds the necessary parameters. These are:

<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">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">Parameters</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">Alphan.</td><td valign="top">Spaces. If its value is * it is ignored.</td></tr><tr><td valign="top">2</td><td valign="top">Function</td><td valign="top">2</td><td valign="top">No.</td><td valign="top"><p>Function:</p><p>01- Load</p><p>02- Process post-issue presentation.</p><p>03- Issue presentation</p><p>05- Interrupt issue presentation.</p><p>06- Initialize reception presentation.</p><p>07- Unload reception presentation.</p><p>08- Receive presentation.</p><p>09- Interrupt reception presentation.</p><p>10- State initialization.</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">Separator dash</td></tr><tr><td valign="top">2</td><td valign="top">Resource</td><td valign="top">1</td><td valign="top">Alphan.</td><td valign="top"><p>Resource from which the program gets the sessions</p><p>F – File</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">Alphan.</td><td valign="top">Separator dash</td></tr><tr><td valign="top">2</td><td valign="top">Direction</td><td valign="top">1</td><td valign="top">Alphan.</td><td valign="top"><p>(Only necessary with function 10):</p><p>E – Issue.</p><p>R – Reception.</p></td></tr><tr><td valign="top">2</td><td valign="top">Filler</td><td valign="top">73</td><td valign="top">Alphan.</td><td valign="top">Space reservation area</td></tr></tbody></table>

The sessions can be specified after this record (if Resource J was indicated), or in the PETICION file (fixed 80-character record), if Resource F was indicated. The following will be specified:

<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">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">Session</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">Alphan.</td><td valign="top">Spaces. If its value is * it is ignored.</td></tr><tr><td valign="top">2</td><td valign="top">Presentation origin</td><td valign="top">9</td><td valign="top">Alphan.</td><td valign="top">Presentation origin (zeros so that the request is made against all possible origin Cgo. values).</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 destination</td><td valign="top">9</td><td valign="top">Alphan.</td><td valign="top">Presentation destination (zeros so that the request is made against all remote Cgo. values).</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">Application</td><td valign="top">6</td><td valign="top">Alphan.</td><td valign="top">Application (zeros for any application).</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">Use file list</td><td valign="top">1</td><td valign="top">Alphan.</td><td valign="top"><p>Y/N. Optional in the load (ZTBGB110).</p><p>Indicates whether you want to use a file list (ZTBGFCAR) to load the application files.</p><p>If S is entered, the file list will be loaded instead of what is in the profiles. If there is nothing in the profiles, it fails.</p><p>If N or nothing is entered, what is in the profile is loaded. If this has nothing, the file list is loaded.</p></td></tr><tr><td valign="top">2</td><td valign="top">Filler</td><td valign="top">51</td><td valign="top">Alphan.</td><td valign="top">Space reservation area</td></tr></tbody></table>

The JCL would look as follows:

```cobol
//KI0EEC03 JOB (EGDC,KIT,,99),'PET-MASIVAS',MSGCLASS=H,CLASS=A,        
//             NOTIFY=&SYSUID                                          
//*********************************************************************
//* INDRA, S.A.- COMMUNICATIONS SOLUTIONS                       JUN. 2001  *
//*********************************************************************
//*********************************************************************
//*   GENERIC REQUESTS.                                             
//**********************************************************************
//*FORMAT OF THE FIRST JCL RECORD (SEPARATED BY HYPHENS).             
//*                                                                     
//*FF-R-S   : FF -> FUNCTION : 01 LOAD                                 
//*                           02 PROCESS POST-ISSUE PRESENTATION
//*                           03 ISSUE PRESENTATION                   
//*                           05 INTERRUPT ISSUE PRESENTATION   
//*                           06 INITIALIZE RECEPTION PRESENTATION    
//*                           07 UNLOAD RECEPTION PRESENTATION   
//*                           08 RECEIVE PRESENTATION                  
//*                           09 INTERRUPT RECEPTION PRESENTATION 
//*                           10 STATE INITIALIZATION             
//*                                                                    
//*         : R  -> RESOURCE : (WHERE THE PROGRAM TAKES THE SESSIONS FROM)
//*                           F FILE                                
//*                           J JCL                                    
//*                                                                     
//*         : S  -> DIRECTION :  (ONLY WHEN THE FUNCTION IS = 10)       
//*                           E ISSUE                                
//*                           R RECEPTION                 
//*FORMAT OF THE FOLLOWING JCL RECORDS (SEPARATED BY HYPHENS)   
//*         : ORIGIN (9 OCTETS)                                      
//*         : DESTINATION (9 OCTETS)                                      
//*         : APPLICATION (6 OCTETS)                                   
//*      FILE LIST (Y/N) (OPTIONAL) (1 OCTET)                   
//*       -INDICATES WHETHER YOU WANT TO USE FOR THE LOAD A LIST THAT    
//*        CONTAINS THE APPLICATION FILES (ZTBGFCAR).            
//*       -IF THE PARM DOES NOT REACH PROGRAM ZTBGB110, OR IT REACHES IT AS N,    
//*        THE LOAD PROGRAM TAKES THE APPLICATION FILES FROM PROFILES.
//*        IF THERE ARE NO FILES IN THE PROFILES, IT LOOKS FOR THEM IN A    
//*        FILE LIST ALREADY CREATED (ZTBGFCAR)                     
//*       -IF LF=S, THE LOAD PROGRAM TAKES THE APPLICATION FILES FROM 
//*        A FILE LIST ALREADY CREATED (ZTBGFCAR). IF IT DOES NOT EXIST   
//*        THAT LIST, IT CRASHES.                                          
//**********************************************************************
//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-en/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.
