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


Please Help Members By Posting Answers For Below Questions

which cics service transaction is used to gain accessibility to cics control tables? Mention the one that has the highest priority.?

695


Define ceci?

615


In the EIB block of CICS, highlight the names of few of the important fields?

578


Kindly specify the pic clause for the any bll cell type of data fields?

711


when an apllication is invoked via the exec cics start command with the from option, how does the application gain access to the common area?

643






What are the types of processes to create a map in cics?

579


What are the common cics service programs and explain their usage?

558


What is program reentrance?

614


Explain the difference between tsq and tdq

597


Can you explain differences between temporary storage queue (tsq) and transient data queue (tdq)?

584


What is the main function of the sign-on table?

587


What is frset?

568


Explain the difference between start and xctl?

561


Explain how many exceptional condition can be given in a handle condition?

531


Add a field to screen when what's the flow of impact?

2406