IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

why I am receiving MAPFAIL condition


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Saurabh_kapoor

New User


Joined: 18 Feb 2009
Posts: 1
Location: Bangalore

PostPosted: Mon Mar 16, 2009 3:57 pm
Reply with quote

I am also receiving the MAPFAIL condition when I am trying to navigate back to the main menu screen by pressing PF2 key. here, I am not doing any function but I just want to navigate back to the main menu screen.

My code is:

Code:
4000-PROCESS-HOME-PARA.                                     
      EXEC CICS RECEIVE                                     
           MAP('CCPHOME')                                   
           MAPSET('CCPHOME')                                 
           RESP(WS-RESP)                                     
      END-EXEC                                               
      IF WS-RESP = DFHRESP(NORMAL)                           
      EVALUATE TRUE                                         
          WHEN EIBAID = DFHPF2                               
RETURN TO HOME PAGE                                         
               PERFORM 2000-SEND-PARA THRU 2000-SEND-EXIT   
               PERFORM 3000-RETURN-PARA THRU 3000-RETURN-EXIT
          WHEN EIBAID = DFHPF4                               
              PERFORM 3100-RETURN1-PARA                     
          WHEN EIBAID = DFHENTER                           


Can you please let me know what is the error in this and why I am receiving MAPFAIL condition.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Mon Mar 16, 2009 4:09 pm
Reply with quote

In your BMS definition, define a small "Static" field, which doesn't have a label, to include the FSET attribute in the ATTRB parameter.

Then, whenever a proper key is pressed and no map-data has been altered (no MDT's have been set) during a RECEIVE MAP, a MAPFAIL condition will not be raised.

Regards,
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Tue Mar 17, 2009 2:54 am
Reply with quote

A slight correction to my previous post (CRS ya know). icon_wink.gif

When you add FSET to the ATTRB parameter, the BMS map-field (DFHMDF) must have an associated label but it is not editable (IE: ASKIP,NORM,FSET)

Regards,
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Wed Mar 18, 2009 12:24 am
Reply with quote

Hi S Kapoor

Welcome to the forum.

Your mapfail condition can easily be removed by modiffying the position of your code. First you use EVALUATE TRUE, then issue a RECEIVE MAP statement .
Eg. If EIBAID = DFHRESP(PF2), your program is not going to execute a RECEIVE MAP statement.

Code:
4000-PROCESS-HOME-PARA.                                     
      EVALUATE TRUE                                         
          WHEN EIBAID = DFHPF2                               
RETURN TO HOME PAGE                                         
               PERFORM 2000-SEND-PARA THRU 2000-SEND-EXIT   
               PERFORM 3000-RETURN-PARA THRU 3000-RETURN-EXIT
          WHEN EIBAID = DFHPF4                               
              PERFORM 3100-RETURN1-PARA                     
          WHEN EIBAID = DFHENTER   
                EXEC CICS RECEIVE                                     
                       MAP('CCPHOME')                                   
                       MAPSET('CCPHOME')                                 
                       RESP(WS-RESP)                                     
                END-EXEC                                               
                IF WS-RESP = DFHRESP(NORMAL)  .......   
                       .................
       END-EVALUATE. 

I guess your program is going to receive a map, only when ENTER key is pressed. Otherwise change your code as per requirement.

Hope this will help you.

Regards
Raghu
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Mar 18, 2009 1:34 am
Reply with quote

well, I learned something today:
you do not need a RECEIVE to populate EIBAID.
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Wed Mar 18, 2009 5:08 am
Reply with quote

raghu,

your suggestion is confusing. Mapfail can still occur on enter key


use Bill's solution....
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Mar 18, 2009 5:43 am
Reply with quote

dbzTHEdinosauer wrote:
well, I learned something today:
you do not need a RECEIVE to populate EIBAID.
Pseudo-conversational transactions do have a different set of parameters that they will/can respond to....grin.....
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Receiving RC 5 when executing REXX pr... CLIST & REXX 3
No new posts How to give complex condition in JCL . CLIST & REXX 30
No new posts selectively copy based on condition DFSORT/ICETOOL 3
This topic is locked: you cannot edit posts or make replies. Control-m JOB executing even when the... Compuware & Other Tools 6
No new posts Dynamic condition checks COBOL Programming 5
Search our Forums:

Back to Top