I getting back into the CICS world after a 10 year absence. Does anyone have a sample program that tests if the MDT, including both erase EOF and erase screen, was modified before updating the BMS filed to a database. I have the Murach sample programs but all their fields are transmitted even if they were not modified. I'm specifically looking for the sample program used in Computer Tasks Group's CICS course but I will take any similar programs.
Please note that I am not looking for any companies software that is in use. I am only looking for samples that can be legally shared.
Joined: 14 Jan 2008 Posts: 2504 Location: Atlanta, Georgia, USA
Welcome to the forum.
To test MDT's after a RECEIVE would be to check if the map-field's length is greater than zero.
For testing ERASE-EOF (after the RECEIVE as weil), check the attribute field for a X'80'. I believe this is defined to copybook DFHBMSCA as DFHBMEOF. If not, it's easy enough to define your own or use a hex-literal.
Some shops set the attribute-byte to FSET for each map field, instead of moving these map-fields to the commarea.
When all map-fields attribute-bytes are set to FSET, then all the data is sent and upon the next RECEIVE, all of the length fields associated with these previous FSET fields will be greater than zero. This would cause re-editing/validating of the map-data again, not to mention re-transmitting of all the map-data, again and again (SEND/RECEIVE). This is why the commarea should be used to hold previously entered and validated map-data.
Unfortunately, I don't have a sample program. But, there might be some in one of the IBM manuals.
OK, thanks for the update. How about checking for the Erase Screen key? Does this key even exist on the keyboard any longer? Although I think someone can program this key if it doesn't.
I remember that it was important to use FSET and FRSET to check if a field was changed for two reasons. The first reason was to prevent modifying a unchanged field with old data after it was modified and updated by someone else. The second was to minimize the data flow over the transmission lines. Is this still important considering the high speed data lines in use today?