Additional Form Services
At a minimum, sofmsv01.p and similar procedures facilitate printing a shipper. However, this type of procedure can provide other services also. For example, some local requirements dictate that additional data, which is neither maintained using the standard shipper maintenance programs nor stored in the standard record structure, display on printed shipping documents.
Services for handling the maintenance of such additional data can be included, or encapsulated, within the same procedure that handles printing the shipper. Therefore, sofmsv01.p and similar procedures are referred to as service encapsulation procedures. The sofmsvnn.p procedure includes all of the services required to maintain the necessary data and print a shipping document for all shippers with a document format using form code nn.
Example: Suppose your local jurisdiction requires a permit in order to transport certain goods, and the permit number must display at the top of printed shipping documents. The system provides no facilities for maintaining such a permit number, storing it with the shipper, or printing it on shipping documents.
You can create a custom procedure encapsulating the services that enable you to enter the permit number when maintaining the shipper, print the number on the shipper, archive the number prior to deletion, and delete the additional data with the shipper. The custom procedure can then be associated with a document format through the use of the form code and the document format can be assigned to any shippers within the local jurisdiction.
Each of the services within an encapsulated procedure, including the one that prints the document, is implemented as a separate internal Progress procedure. The encapsulation procedure itself is simply a collection of internal procedures—it does not have its own executable procedure body.
Sample Procedure—sofmsv01.p
The sofmsv01.p service encapsulation procedure prints standard shippers. The procedure also serves as a model for end-user customization. It includes internal comments that document the technical aspects of creating a procedure to process and print customized shipping documents.
In addition to the internal documentation and the functioning print service, sofmsv01.p also includes sample internal service procedures for all of the services supported by shipping, including gathering, storing, archiving, and deleting additional shipper information.
Because these services are not required for the actual processing of standard shippers, the sample procedures in sofmsv01.p are disabled by being enclosed within comments. The procedures are otherwise fully functional and can be enabled by removing the comments.