

Data Manipulation Language Statements › #MREQ—determines how data is transferred
#MREQ—determines how data is transferred
The #MREQ statement determines how data is transferred between the terminal and program variable storage. There are three types of #MREQ statements, each performing a different type of I/O operation:
- #MREQ IN transfers data from the terminal device to program variable storage.
- #MREQ OUT transfers data from program variable storage to the terminal device.
- #MREQ OUTIN transfers data from program variable storage to the terminal device, followed by a transfer from the terminal device back to program variable storage.
Native Mode Transfers
You can also use the #MREQ statement to perform the following native-mode data transfers:
- Map in data from an area in variable storage that contains a 3270-like data stream to data fields defined for the map.
- Map out data to another area in variable storage.
Synchronous and Asynchronous Requests
All #MREQ input requests are synchronous; output requests can be either synchronous or asynchronous:
- For synchronous requests, control does not return to the issuing program until the I/O operation is completed. You specify a synchronous input request (the default for mapping output) by indicating YES in the CHECK parameter, as described below.
- For asynchronous requests, control is returned to the issuing program immediately after the requested I/O operation is initiated. The program continues to execute concurrently with the I/O operation. An ECB is established that will be posted after the I/O has been completed. The address of the ECB is contained in register 1.
To ensure that the previous #MREQ processing has been completed before you issue an #MREQ request, your program must issue a #TREQ CHECK following asynchronous data transfer.
Note: For more information about the #TREQ CHECK statement, see #TREQ later in this chapter.
To transfer data immediately from program variable storage to the terminal, your program can issue a write-direct-to-terminal #MREQ OUT request (blast). Blast requests must be directed to 3270 devices that support mapping-mode terminal I/O operations.
Note: For more information about mapping functions, see the Mapping Facility Guide.
Copyright © 2014 CA.
All rights reserved.
 
|
|