View previous topic :: View next topic
|
Author |
Message |
Ezhil Murugan
New User
Joined: 10 Jul 2008 Posts: 14 Location: Chennai
|
|
|
|
Hi,
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? |
|
Back to top |
|
|
Prasanthhere
Active User
Joined: 03 Aug 2005 Posts: 306
|
|
|
|
How is the EMAIL ID field declared with in the DB2 table? |
|
Back to top |
|
|
Ezhil Murugan
New User
Joined: 10 Jul 2008 Posts: 14 Location: Chennai
|
|
|
|
Hi ,
It's EMAIL_TXT CHAR(45) |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
your could define a trigger to the table that contains the email-id column and fire off an error when an attempt is made to change email-id column from spaces to low-values. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
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. |
|
Back to top |
|
|
atosvv
New User
Joined: 04 Dec 2008 Posts: 11 Location: Mumbai
|
|
|
|
Hi Ezhil,
Please have an input field control check in COBOL Service Program.
IF IN-EMAIL-TXT = LOW-VALUES
MOVE SPACES TO WW-EMAIL-TXT
ELSE
MOVE IN-EMAIL-TXT TO WW-EMAIL-TXT
END-IF
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
END-IF.
Whatever WEB sends a valid value to MF, Even though MF Program has to have a control check on each and every input field.
-VV |
|
Back to top |
|
|
|