> 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/consulta-de-estados-transmisiones-criticas.md).

# Status query (critical transmissions)

This function allows control of the completion-interruption of a presentation (for sending or for receiving). It consists of a JCL step, which does not finish until the presentation reaches these states or until an interval imposed by parameters to this function is met (for more information see the manual ([Application Program Interfaces](/documentacion-editran/ibm-editran-v5.3-comun-z-os-en/interfaces-de-programas-de-aplicacion.md)). The JCL is presented as follows:

```cobol
//PASOTC     EXEC PGM=ZTBGBUTC,                            
//PARM=’parm1parm2parm3parm4parm5parm6’        
```

The meaning of parm\* is as follows:

1. Parameters that will ultimately be passed as a communication area with the API:

* Parm1- Function (01, 02, 03, 04) With function 01: Queries until the maximum interval is met. Function 02: Queries until the time limit is met. Function 03: Immediate queries. Function 04: see if it can be loaded
* Parm2- Direction (E/R) (EMISSION-RECEPTION)
* Parm3- Presentation session
* Parm4- Wait interval (hhmmss) or waiting time between each query.
* Parm5- Maximum interval or maximum time limit, during which the process will remain started if the state-scanning criterion is not met.

2. Parameters only for ZTBGBUTC:

* Parm6- Save listing at the end of the process (Y/N) with the results obtained.

Example: PARM=’01E000099990000099940TELECA010422815324S’

1. Parm1 (Function 01) -Verify interrupted and finished states based on time intervals)
2. Parm2 (Direction E) – Direction of the presentation EMISSION
3. Parm3 (Presentation session): Origin: 000099990, Destination: 000099940, Application: TELECA
4. Parm4 (Wait interval) – If the presentation session does not find the described states in EMISSION, it will remain in WAIT 1 hour, 4 minutes and 22 seconds, until asking again for those states. The number of wait intervals that will be carried out, at most, depends on parm5. The last wait interval is calculated based on the maximum interval, so that if the wait interval is 3862 seconds (1 hour, 4 minutes and 22 seconds) and the maximum interval is 294804 seconds (81 hours, 53 minutes, 24 seconds), the formula is applied; 294804 /3862 = 76 wait intervals and the last interval is the remainder (1292 seconds), although the times during which process execution has occurred must be subtracted from this.
5. Parm5 (Maximum process interval): The process will remain started, if the requested states are not met, for 81 hours, 53 minutes and 24 seconds. If zeros are specified in this parameter, control is returned to the application immediately
6. Parm6 (Save-listing S): It is desired that the program ZTBGBUTC save a listing with the results obtained


---

# 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/consulta-de-estados-transmisiones-criticas.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.
