Before build a production object, determine what objects are necessary to produce the required output transaction. Generally, a production object needs at least one field, one rule, and rule component objects.
Field objects – you need a field object for each piece of data in the input transaction that the production object needs to manipulate and/or place into the output transaction. For this example, since every piece of the incoming transaction goes into the output transaction, seven field objects are needed.
Rule objects – depending on the kind of data manipulation the production object needs to do, more than one rule object may be needed. This is because of the way that transaction production uses the blob work areas in rules and components to build up the output transaction. See “General processing example” for more information about blob work areas. While one rule object is sufficient to produce the output transaction, this example uses three rule objects to demonstrate the use of multiple rule objects.
Component objects – a component object is needed for each piece of data that the production object places into the output transaction. For this example, eight component objects are necessary—one to place each piece of the input transaction into the output, and one to add the header information to the output transaction.
Filter objects – filter objects are needed to perform any data manipulation and translation. For this example, two filters objects are needed to manipulate data into the correct format—one to change the name data to uppercase letters, and one to change the state data. The example also uses filter objects to add the necessary separator characters to the output transaction—one to add the “|” separator, and one to add the “***” separator.
Table objects – table objects are a simple way to replace one piece of data with another. This example uses a table object within the filter object that changes the state data.
Copyright © 2005. Sybase Inc. All rights reserved. |
![]() |