Page 274 -
P. 274

Chapter 9  •  proCess speCifiCations and struCtured deCisions     241

                                                                                                Figure 9.6
                                                                                                Structured English for creating the
                                Structured English
                                                                                                shipping statement for World’s
                                                                                                Trend.
                                Format the Shipping Statement.  After each line of the statement has been
                                formatted, write the shipping line.
                               1.     GET Order Record
                               2.     GET Customer Record
                               3.     Move Order Number to shipping statement
                               4.     Move Order Date to Shipping Statement
                               5.     Move Customer Number to Shipping Statement
                               6.     DO format Customer Name (leave only one space between First/Middle/Last)
                              7.     DO format Customer Address lines
                              8.     DO WHILE there are items for the order
                              9.              GET Item Record
                             10.              DO Format Item Line

                             11.              Multiply Unit Price by Quantity Ordered giving Extended Amount
                             12.              Move Extended Amount to Order Item Lines
                             13.              Add Extended Amount to Merchandise Total
                            14.              IF Quantity Backordered is greater than zero
                            15.                      Move Quantity Backordered to Order Item Lines
                            16.              ENDIF
                            17.     ENDDO
                            18.     Move Merchandise Total to Shipping Statement
                            19.     Move 0 to Tax
                           20.     IF State is equal to CT
                           21.              Multiply Merchandise Total by Tax Rate giving Tax
                           22.     ENDIF
                           23.     Move Tax to Shipping Statement
                           24.     DO calculate Shipping and Handling
                           25.     Move Shipping and Handling to Shipping Statement
                          26.     Add Merchandise Total, Tax, and Shipping and Handling giving Order Total
                          27.     Move Order Total to Shipping Statement





                 time are actually ambiguous. For example, do we add the claim to the year-to-date (YTD) claim
                 before or after updating the deductible? Is it possible that an error can occur if something other
                 than policy A or B is stored in the claimant’s record? We subtract 40 percent of what from the
                 claim? These ambiguities need to be clarified at this point.
                     Besides the obvious advantage of clarifying the logic and relationships found in human
                 languages, structured English has another important advantage: It is a communication tool.
                 Structured English can be taught to and hence understood by users in the organization, so if com-
                 munication is important, structured English is a viable alternative for decision analysis.

                 Data Dictionary and Process Specifications
                 All computer programs may be coded using the three basic constructs: sequence, selection (IF . . .
                 THEN . . . ELSE and the case structure), and iteration or looping. The data dictionary indicates
                 which of these constructs must be included in the process specifications.
                     If the data dictionary for the input and output data flow contains a series of fields without
                 any iteration—{ }—or selection—[ ]—the process specification will contain a simple sequence
                 of statements, such as MOVE, ADD, and SUBTRACT. Refer to the example of a data dictionary
                 for the SHIPPING STATEMENT, illustrated in Figure 9.5. Notice that the data dictionary for
                 the SHIPPING STATEMENT has the ORDER NUMBER, ORDER DATE, and CUSTOMER
                 NUMBER as simple sequential fields. The corresponding logic, shown in lines 3 through 5 in the
                 corresponding structured English in Figure 9.6, consists of simple MOVE statements.
   269   270   271   272   273   274   275   276   277   278   279