

Data Manipulation Language Statements › #TREQ
#TREQ
Functions of #TREQ
The #TREQ statement allows your program to do the following:
- Transfer data between a terminal device and your application program in basic mode. Device-control characters appropriate to your terminal device are sent along with the data.
- Converse with SNA resources.
- Acquire and release storage areas used for I/O buffers. The following considerations apply:
- In response to an input request, the input for data-item descriptions is acquired dynamically from the storage pool. Use the LOCATE option of the #TREQ GET or #TREQ READ statement to acquire the input buffer. When you specify LOCATE, your program is responsible for releasing the acquired storage with a #FREESTG statement. If the storage is not explicitly freed, the system releases all acquired input buffers when the task terminates.
- In response to an output request, a previously acquired storage area for the output buffer is released. To release the output buffer, use the FREEBUF option of the #TREQ PUT, #TREQ WRITE, #TREQ PUTGET, or #TREQ WRITREAD statement. The output buffer is released on completion of the output request.
DC/UCF Response to #TREQ
The DC/UCF system does the following in response to a #TREQ request:
- Automatically inserts the appropriate line control characters
- Builds and/or modifies a terminal request block (TRB), depending on the type of #TREQ request:
- For regular #TREQ requests (MF=R), the system builds a new TRB for each request. Constant values are specified for each subsequent #TREQ request.
- For list #TREQ requests (MF=L), the system builds a TRB in the data definition section of program storage. Subsequent #TREQ statements include parameters that add to or override this predefined TRB. The list #TREQ statement defines constant values; subsequent execute (MF=E) #TREQ statements modify the previously designate TRB. This technique saves coding time and storage space.
- Initiates the requested I/O operation and transfers the data
Copyright © 2014 CA.
All rights reserved.
 
|
|