How can we code a program such that we will never get a
MAPFAIL error?
Answer / 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 |
Add a field to screen when what's the flow of impact?
What are the recoverable cics resources?
Hai I have a VSAM file and there are two CICS pgms A and B both intends to update the file. How to code the program so that it does not under go a dead lock situation.
How are programs reinitiated under CICS ?
Is there any entry for TSQs in CICS tables?
What is ENQ in CICS?
What is the effect of including the TRANSID in the EXEC CICS RETURN command?
what is eib, how is can be used?
What is the drawback of using HANDLE CONDITION?
where we can declare the files in fct and pct and ppt and rct pls give clear structure
What is task control?
A mapset consists of three maps and 10 fields on each map . How many of the following will be needed ?