Wayfinder / Case study / Topic detail

Source-derived document; reported behaviour, inference and evidence gaps are identified in the text.

Return to: 02 — Business Capability Map — topic detail

Customer management and search

In this document

The legacy Informix-4GL source provides customer search, addition, update, deletion, and customer/order lookup. In menu1.4gl.main, the main menu selects customer or order mode through the cur flag. Query searches customers when cur = 1 and orders otherwise; Add, Update, and Delete dispatch to the corresponding customer or order functions. Update, Delete, and Detail first check exist and display a message requiring a selection when no current row is available. E0009

Customer browsing constructs a query string, prepares and opens a scroll cursor, fetches a first row, and supports Next, Previous, First, Last, and Select-and-exit operations. The separate query1.4gl.main program uses CONSTRUCT BY NAME query_1 ON customer.*, supports field help through F1 or Ctrl-W, and provides state help through F2 or Ctrl-B when the cursor is in the state field. It can display all customers after confirmation when no search field was touched, reports No rows found. when appropriate, and otherwise reports when no more rows satisfy the search criteria. E0009

The Java target class D4_Cust.java independently shows one-customer and many-customer additions, customer finding, update, deletion, ordered browsing by last name, explicit Select and Quit choices, field help, and state selection. It inserts a customer, obtains the last serial number, stores it as the customer number, and reports the assigned number. Interrupted input cancels the addition; interrupted updates reload and redisplay the selected row. Deletion requires a selected customer, prevents deletion when counted orders exist, and requires a y or Y confirmation. E0009

The relationship between D4_Cust.java and the displayed 4GL sources is unresolved. The Java class uses a customer company field, an explicit add/find/update/delete menu, and ORDER BY lname, while the shown menu1.4gl.main and query1.4gl.main do not establish the same structure or ordering. The Java class is therefore target evidence, not proof of a one-to-one translation of either displayed source program. E0010