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.
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.