As we noted earlier, we explain receiving input from a terminal in terms of 3270 devices. You should also read Support for non-3270 terminals if you are writing for non-3270 terminals.
CICS® normally reads a 3270 screen with a "read modified" command6. The data transmitted depends on what the operator did to cause transmission:
You can tell which event occurred, if you need to know; we explain how in Using the attention identifier. You can also find more detail on 3270 input operations in Input from a 3270 terminal.
The short read keys transmit only the attention identifier (the identity of the key itself). No field data comes in, and there is nothing to map. For this reason, short read keys can cause the MAPFAIL condition, as explained on page MAPFAIL and other exceptional conditions. Field selection features transmit field data, but in most cases not the same data as the ENTER and PF keys, which we describe in the paragraphs that follow. See Support for special hardware for the exceptions if you plan to use these features.
Most applications are designed for transmission by the ENTER key or a PF key. When one of these is used to transmit, all of the fields on the screen that have been modified, and only those fields, are transmitted.
As we explained in Modification, a 3270 screen field is considered modified only if the "modified data tag" (MDT), one of the bits in the field attributes byte, is on. The terminal hardware turns on this bit if the operator changes the field in any way--entering data, changing data already there, or erasing. You can also turn it on by program when you send the map, by including MDT among the ATTRB values for the field. You do this when you want the data in a particular field to be returned even if the operator does not change it.
You can tell whether there was input from a particular map field by looking at the corresponding length (L) subfield. If the length is zero, no data was read from that field. The associated input (I) subfield contains all nulls (X'00'), because BMS sets the entire input structure to nulls before it performs the input mapping operation. The length is zero either if the modified data tag is off (that is, the field was sent with the tag off and the operator did not change it) or if the operator erased the field. You can distinguish between these two situations, if you care, by inspecting the flag (F) subfield. It has the high-order bit on if the field contains nulls but the MDT is on (that is, the operator changed the field by erasing it). See Finding the cursor for more information about the flag subfield.
If the length is nonzero, data was read from the field. Either the operator entered some, or changed what was there, or the field was sent with the MDT on. You may find the data itself in the corresponding input (I) subfield. The length subfield tells how many characters were sent. A 3270 terminal sends only non-null characters, so BMS knows how much data was keyed into the field. Character fields are filled out with blanks on the right and numeric fields are filled on the left with zeros unless you specify otherwise in the JUSTIFY option of the field definition. BMS assumes that a field contains character data unless you indicate that it is numeric with ATTRB=NUM. See the CICS Application Programming Reference manual for details of how these options work.
CICS converts lower case input characters to upper case automatically under some circumstances. The definition of the terminal and the transaction together determine whether translation occurs. See the UCTRAN option of the PROFILE and the TYPETERM definitions in CICS Resource Definition Guide for how these specifications interact.
You can suppress this translation by using the ASIS option on your RECEIVE MAP command, except on the first RECEIVE in a task initiated by terminal input. (The first RECEIVE may be either a RECEIVE MAP (without FROM) or a terminal control RECEIVE.) CICS has already read and translated this input, and it is too late to suppress translation. (Its arrival caused the task to be invoked, as explained in How tasks are started.) Consequently, ASIS is ignored entirely in pseudoconversational transaction sequences, where at most one RECEIVE MAP (without FROM) occurs per task, by definition. For the same reason, you cannot use ASIS with the FROM option (see Formatting other input).