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 |
TSQs can be written in the Main storage or Auxiliary storage (True or False).
Explain the function of the load command?
Generally we check EIBALEN = 0 to decide whether first call or not. If I do not pass any value in the COMMAREA then EIBCALEN will be 0 even on second call. Now how can we say the program is called for the first time or second time?
How do you delete Item 3 in a five-item TSQ?
How errors are handled in CICS programs?
Code the related portions of cics/cobol-i programs to gain addressability to twa area assigned to a particular task. Assme that the size of twa area is 300bytes. What are the advantages if cobol-ii is used in the place of cobol?
How to import the cics code for updations? what are steps do we need follow for execution again after modification? plz any body help me to know
what is partial serch analysys in cics?
Explain the function of the terminal control table?
Why must all CICS programs have a Linkage Section ?
Which type of TDQ is read destructive?
I have a Field which is of size 9(4). In the Screen if I enter the value for this field as 1234, it showing it as Valid. But if I enter only one or two digits, zeros should be appended in the remaining places. For example: When u enter 1 in the screen the output should be 0001. When you enter 12, output should be 0012. How to achieve this in the program?