How can we code a program such that we will never get a
MAPFAIL error?



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

Post New Answer

More CICS Interview Questions

How do you delete Item 3 in a five-item TSQ?

3 Answers   IBM,


What is CECI?

5 Answers   IBM,


What is the size of commarea

5 Answers   IBM,


How errors are handled in CICS programs?

0 Answers  


If no exception handling is provided in the program, what will happen ?

1 Answers  






What is the use of DCT?

2 Answers   IBM,


Which is the command that is used to dump the main storage areas related to a task?

1 Answers   IBM,


What does it mean when EIBCALEN is equal to 1 and other values?

5 Answers  


Name at least one of the ways by which a transaction can be terminated?

0 Answers  


What is meant by a ‘Transid’ ?

0 Answers  


What is meant by an AICA ABEND?

0 Answers  


What are the cics tables?

0 Answers  


Categories