• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trying to see where Java is adding records. For new customers  RSS feed

Paul Fraser
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are trying to see where the Java code is determining if a customer name/number is new, and then what does it do? because we do know that it IS adding a new customer record.

Here ValidCustNum is set to true if there is record match.

here seems to be adding records, is that correct?


// DIONAM - interface file for SRONAM, new customers, basic data
dionam = (IAS400File) ASW.openAS400File("DIONAM", "", 2, false);
// DIONAD - interface file for SRONAD, new customers, Addresses
dionad = (IAS400File) ASW.openAS400File("DIONAD", "", 2, false);
// DIONOI - interface file for SRONOI, new customers, customer data
dionoi = (IAS400File) ASW.openAS400File("DIONOI", "", 3, false);
// DIOCMA - interface file for SROCMA, new customers, A/R data
diocma = (IAS400File) ASW.openAS400File("DIOCMA", "", 3, false);
// DIONFP - interface file for SRONFP, new customers, contact data
dionfp = (IAS400File) ASW.openAS400File("DIONFP", "", 3, false);

srbtpi = (IAS400File) ASW.openAS400File("SROTPI", "", 3, false);
srbtpd = (IAS400File) ASW.openAS400File("SROTPD", "", 3, false);
Paul Clapham
Posts: 22828
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul, welcome to the Ranch!

First of all, I added code tags around your Java code, so it comes out much more readable in the forum. (When you post, there's a link which says "What do these tags mean?". If you follow it, you'll find out how to format your posts more nicely.)

But back to the question: It looks to me like that code runs a query to see if a given customer number is in the SRONAM table. If the query produces one or more records then it returns true, otherwise false. In other words the method returns true if the given customer number is in the table and false if it's not. Caveat: I'm assuming that the methods used in that code actually do what their names suggest they do. If you've got bugs in those methods then all bets are off.

And then what does it do? Well, "it" in that case is the code which called that method. Perhaps there's a statement starting "if (validCustNum(number)) ..." in that code or something like that, but I'm only speculating. If you're looking for the code which adds a new customer record, what you've posted isn't that code. It's possible that the code which calls the posted method is the guilty party.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!