How can we code a program such that we will never get a
MAPFAIL error?
Answer Posted / rakesh
Normally MAPFAIL just indicates that no data has ben entered in any of the fields, and thus the MDT-bit is not set in the fileds attribute-byte. CICS issues a "Read Modified" 3270-command, and receives data from fields that has the MDT-bit set. When you get MAPFAIL, this just tells you that no field has been modified, an really is "normal".
In program logic you have to check if data has been entered in mandatory fileds. The result may vary, and is a result of users action. Zero or many fileds may have been modified.
In your program logic you should FIRST check for invalid PF/PA/Clear-keys, and ONLY do a Receive Map after the check. There is no need to do a Receive Map if the user pressed the Clear or a PA-key, as an example. The EIBAID contains the value for the key pressed to initiate this pseudoconversation - even without a Receive Map.
If you use Resp Option, coding RESP(ws-variable) in your Receive Map, you can eliminate the Mapfail problem.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Define task work area?
Define the term transaction routing?
If we wish to create bms executable, what are the basic steps that the user has to go through?
How many ways are there for initiating a transaction?
How can you use dynamic calls in cics?
In a CICS program, how will you read a VSAM file?
Explain the difference between exec cics handle condtion and an exec cics ignore command?
What are the common tables in cics and their usage?
What is a transid?
Explain the difference between a symbolic map and physical map?
What is the meaning of the enq command?
Define TCT.
Explain how many exceptional condition can be given in a handle condition?
Receive consists of buffer option in it. What is the significance of this option?
which cics service transaction is used to gain accessibility to cics control tables? Mention the one that has the highest priority.?