My application has a web front end and Mainframe Cobol module accessing DB2 in the backend. Email id is a field in the web and it gets stored in the Db2 tables. I could see that for one or 2 rows , emailid gets changed from SPACES to low-values when Web users do some transactions in the front end. This is happening even when the user does no changes in the Email field. I could see that the initializations are properly done for t he variables used for email. I tested similar transactions but the issue did not happen. Any idea what might be the reason it's happening for web users' transactions?
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
Sounds like the problem is the front end code. When the user does not enter a value, the web app does not force spaces into the field. Suggest the web app be changed to force spaces when no data is entered.
Depending on how many people following how many differnt coding conventions wrote the "user" presentation code, there may be multiple pieces of presentation code that need to be changed. There may also be some that work as needed.
Please have an input field control check in COBOL Service Program.
IF IN-EMAIL-TXT = LOW-VALUES
MOVE SPACES TO WW-EMAIL-TXT
MOVE IN-EMAIL-TXT TO WW-EMAIL-TXT
Use the WW-EMAIL-TXT while updating or inserting in to the table.
Note:- IN-EMAIL-TXT is the input field which contains the value which has sent by WEB. Declare WW-EMAIL-TXT in Working Storage Section with the size as same as IN-EMAIL-TXT.
While sending data from MF to WEB, have a control check.
Assume OUT-EMAIL-TXT contains the value retrieved from the table.
IF OUT-EMAIL-TXT = LOW-VALUES
MOVE SPACES TO OUT-EMAIL-TXT
Whatever WEB sends a valid value to MF, Even though MF Program has to have a control check on each and every input field.