View previous topic :: View next topic
|
Author |
Message |
Young zhang
New User
Joined: 13 Jun 2008 Posts: 15 Location: china
|
|
|
|
first, I will send a map, in this map, there are some information I want to show it to the user(so, I use sql command to select information and move to the particular field, like user-name).
then, I will receive map and get the user's input. user can change the information on the screen, that is like this: user change the previous user-name then receive map.
but if the user didn't change any information, so how does it give the feedback, is it abend? how to detect whether the field is changed? if abend, how to solve it.
thanks. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
Krishna Velamur
New User
Joined: 22 Aug 2008 Posts: 22 Location: Hyderabad
|
|
|
|
Hi Young zhang,
If the user didn't change any field in the screen, the program won't abend. If you want to know whether any field is changed, there are two ways of doing it.
-> If any field is changed then the length will be greater than zero. Fo example if you have changed Field-1 then Filed-1L (copybook variable) will be greater than zero. So if any of the length variable is greater than zero, then you can say that the map is changed. (There are few exceptions like using del key to delete entire field for which you need to handle the keys)
-> Another method is declaring the previous values in comm area and comparing the current map field and the corresponding comm area field.
Hope this helps. Corrections are welcome. |
|
Back to top |
|
|
Young zhang
New User
Joined: 13 Jun 2008 Posts: 15 Location: china
|
|
|
|
Hi Krishna Velamur,
Thank you for your help. that's very useful. |
|
Back to top |
|
|
|