View previous topic :: View next topic
|
Author |
Message |
william51 Warnings : 1 New User
Joined: 06 Jul 2006 Posts: 31
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
Back to top |
|
|
devidas-patil
New User
Joined: 08 Jan 2007 Posts: 54 Location: pune
|
|
|
|
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 |
|
|
william51 Warnings : 1 New User
Joined: 06 Jul 2006 Posts: 31
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
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 |
|
|
william51 Warnings : 1 New User
Joined: 06 Jul 2006 Posts: 31
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
william51 Warnings : 1 New User
Joined: 06 Jul 2006 Posts: 31
|
|
|
|
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 |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
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 |
|
|
dineshness
New User
Joined: 25 Dec 2006 Posts: 63 Location: Perambalur
|
|
|
|
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 |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
william51 Warnings : 1 New User
Joined: 06 Jul 2006 Posts: 31
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
dineshness
New User
Joined: 25 Dec 2006 Posts: 63 Location: Perambalur
|
|
|
|
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 |
|
|
|