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

How can i do to use command 'RECEIVE MAP' without mapfail


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

New User


Joined: 06 Jul 2006
Posts: 31

PostPosted: Thu Mar 08, 2007 8:06 am
Reply with quote

When user does not change the current screen, after use command 'RECEIVE MAP' i get a mapfail.
So how can i do to use command 'RECEIVE MAP' without mapfail in this situation?

I set attribute of one field in this map to 'FSET',but have no effect.
How should i use ''FSET'?

Thanks.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Thu Mar 08, 2007 8:26 am
Reply with quote

Hello,

You might try to use the RESP keyword in the receive statement. Check if it is mapfail and if so send a message back to the used that they entered no data.

Something like:
Code:
EXEC CICS RECEIVE MAP('ACCTMNU')
                  MAPSET('ACCTSET')                  (if you have one)
                  RESP(RESPONSE)
                  END-EXEC.
 
IF RESPONSE = DFHRESP(MAPFAIL)
   GO TO your-para-to-tell-them.


Good luck and let us know your progress icon_smile.gif
Back to top
View user's profile Send private message
devidas-patil

New User


Joined: 08 Jan 2007
Posts: 54
Location: pune

PostPosted: Thu Mar 08, 2007 9:22 am
Reply with quote

Hi Dick
i was getting the mapfail because of the mapname and the member of the
PDS was not same then i make it same then my prob was solved.
but i want to know if this so then WHY?
Back to top
View user's profile Send private message
william51
Warnings : 1

New User


Joined: 06 Jul 2006
Posts: 31

PostPosted: Thu Mar 08, 2007 10:40 am
Reply with quote

Hi Dick ,
Yes, i can check mapfail.But i want to know is how can i do to prevent the mapfail when user entered no data.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Thu Mar 08, 2007 9:05 pm
Reply with quote

Hello,

One way would be to create an invisible field on your map and define it to be always received. The user would never see the field and you would not need code to populate it or edit it. Would you tell the user when they entered nothing by checking the screen to see if it received data? Would you even tell the user they had done nothing?

I believe checking for mapfail is more common, but am not certain.

Other CICS folks - what say you?
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Fri Mar 09, 2007 8:56 pm
Reply with quote

You have 3 conditions to check on a receive map, a mapfail is one of
them, you need to check the field on the screen in and edit to see if
the user has changed it from the original value.

Code:
EXEC CICS RECEIVE
     MAP    ('SVEAMAP')
     MAPSET ('WSSSVEA')
     INTO   (SVEAMAPI)
     RESP   (WS-CICS-RESPONSE)
     END-EXEC

EVALUATE WS-CICS-RESPONSE
  WHEN DFHRESP (NORMAL)
    CONTINUE
  WHEN DFHRESP (MAPFAIL)
    CONTINUE
  WHEN DFHRESP (EOC)
    CONTINUE
  WHEN OTHER
    MOVE 'S002'                TO CA-MESSAGE-CODE
    MOVE 'DISPLAY MAP FAILED'  TO WS-USER-MESSAGE
    SET WS-CICS-INTERNAL-ERROR TO TRUE
    PERFORM 9900-CICS-PROCESSING-ERROR
END-EVALUATE
Back to top
View user's profile Send private message
william51
Warnings : 1

New User


Joined: 06 Jul 2006
Posts: 31

PostPosted: Mon Mar 12, 2007 12:56 pm
Reply with quote

Thanks.I have a problem with the FEST attribute.
I had already set a field's attribute with FSET,but i still got a MAPFAIL.
As i konw,fset can set the MDT to on.Then why i still get a mapfail?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Mon Mar 12, 2007 1:03 pm
Reply with quote

What key was used to send the map back? What is the DFHAID value?
PA1 and PA2 send no data back and will cause a mapfail.
Was any data recieved? Did the user CLEAR before ENTERing?
Back to top
View user's profile Send private message
william51
Warnings : 1

New User


Joined: 06 Jul 2006
Posts: 31

PostPosted: Mon Mar 12, 2007 7:35 pm
Reply with quote

For instance,press PF8.
After user press PF8,i need to know if the data user entered in current page is valid before page down.
When the user enter no data,i get mapfail.
I want to use FSET to prevent mapfail,but it sames don't work.
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Mon Mar 12, 2007 7:48 pm
Reply with quote

As i stated in the example above, forget the mapfail condition as this is valid and check the data in the map to see if it has changed in an edit routine to validate the map fields. you are missing the point and do not understand how CICS works or functions.
Back to top
View user's profile Send private message
dineshness

New User


Joined: 25 Dec 2006
Posts: 63
Location: Perambalur

PostPosted: Mon Mar 12, 2007 11:31 pm
Reply with quote

Quote:
I had already set a field's attribute with FSET,but i still got a MAPFAIL.


The confusion is because you expected setting the FSET for a field will avoid MAPFAIL condition.

In general, MAPFAIL occurs when no usable data is transmitted from the terminal or when the data transmitted is unformatted.
Setting the FSET for a field would result in the value of the field to be transmitted only when it is changed.


As you have quoted,
Quote:
When user does not change the current screen, after use command 'RECEIVE MAP' i get a mapfail.

if the user doesn't change any of the field in the screen, no data will be passed back to the application program hence resulting in MAPFAIL condition.

Hope this explains the situation.

Dinesh.
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Mon Mar 12, 2007 11:45 pm
Reply with quote

If you do not FSET your fields, then check the map field-name length
field for x'80', this wiil tell you if the field has been modified.


example: USERNAMEL <----- will be a x'80' if modified
USERNAMEA
USERNAMEI
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Tue Mar 13, 2007 1:05 am
Reply with quote

Good point Dinesh...

william51, in the field/fields that you have FSET, what is the value? binary zeros?

When you cedf the transaction, what exactly are you seeing in the input buffer?
Back to top
View user's profile Send private message
william51
Warnings : 1

New User


Joined: 06 Jul 2006
Posts: 31

PostPosted: Tue Mar 13, 2007 8:15 am
Reply with quote

Thanks.Dinesh,but i find below information in "CICS APPLICATION PROGRAMMING REFERENCE"
FRSET
specifies that the modified data tags (MDTs) of all fields currently
in the 3270 (or partition) buffer are to be reset to the unmodified
condition (that is, field reset) before any map data is written to the
buffer.

FSET specifies that the modified data tag (MDT) for this field
should be set when the field is sent to a terminal.

Specification of FSET causes the 3270 to treat the field as
though it has been modified. On a subsequent read from the
terminal, this field is read, whether or not it has been
modified. The MDT remains set until the field is rewritten
without ATTRB=FSET, or until an output mapping request
causes the MDT to be reset.

If fset can not solve the problem,is there any way can solve it?I mean to avoid mapfail when user enter no data?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


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

PostPosted: Tue Mar 13, 2007 9:01 pm
Reply with quote

I do not have time to chase this down or test it out, but this comment just jumped out at me.....
Code:
         EVALUATE CICS-RESPONSE                           
            WHEN DFHRESP(MAPFAIL)                         
*   *             Ignore map fail (may happen when       
*   *             cursor is not positioned in a field     
*   *             defined in the map)                     
            WHEN DFHRESP(NORMAL)                         
                  MOVE INPUT-MAP-AREA   TO WL-MAP-LINKAGE
                  MOVE EIBAID           TO WL-EIBAID     
            WHEN OTHER                                   
                  MOVE  2000            TO WL-ABEND-CODE 
                  MOVE 'CICS'           TO WL-ABEND-TYPE 
                  PERFORM 9800-ABEND-DIAGNOSTICS         
         END-EVALUATE                                     
Back to top
View user's profile Send private message
dineshness

New User


Joined: 25 Dec 2006
Posts: 63
Location: Perambalur

PostPosted: Tue Mar 13, 2007 11:02 pm
Reply with quote

As Mickeydusaor quoted, check for the fieldname+L variable of the problem field for X'80' to check whether the field is modified.

Recieve the map only if the field is modified otherwise do not recieve it and do the required processing that you would have done in a MAPFAIL condition.

Dinesh.
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 REXX/CMS How to place command console... CLIST & REXX 4
No new posts Help needed in automation cics transa... CLIST & REXX 1
No new posts How to Login in to cics region and is... CICS 9
No new posts Passing containers on START command CICS 4
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
Search our Forums:

Back to Top