The exit points were developed to provide a means of reading and writing addresses. These exits can eliminate keying the addresses as input and manually transferring the results of Finalist CICS processing to the proper location for use. The following subsections provide several scenarios for using the exits. These examples do not represent a complete list of uses for the exits. The examples provide a few helpful tips in using the exit points.
The first scenario involves using a sequentially processed file of addresses through Finalist CICS. Each address is read using the input exit program and written using the output exit program. The exit COMMAREA is mapped by distributed source members LPWN020D (Assembler) and LPWN021D (COBOL).
The exit common area contains a safety feature called EXITREQW (the require rewrite switch). If this switch is set to "Y" during the input exit, you are not able to process the next record until the output exit has been called for the current record. This setting prevents records from being accidentally skipped. For more information, see Using the Exit Programs. Once the record is processed, the output routine may need key information to update the record. The two ways to pass this information are described next.
- A four-byte PASSAREA (EXITPAS4): The four-byte PASSAREA is never seen on the screen. This is an ideal use for passing data such as relative record numbers or database keys which only have meaning to a computer.
- A 40-byte PASSTHROUGH area (EXITPASS): The PASSTHROUGH area is shown on the Address Lookup screen. The input routine may set a flag to determine whether this data should be:
- Hidden from the user entirely
- Shown but locked against updating
- Shown with update capability
See source member LPWN020D (Assembler) and/or LPWN021D (COBOL) for more information.
The second scenario involves the ability to enter addresses using the Finalist CICS product as the original entry screen. It may be helpful when entering a new address to track whose address is being entered. Key information relating the address to the addressee is keyed into the Addr Key field on the Address Lookup Screen.
Records going to the output exit may have been manually entered or read with the input exit. It may be necessary to distinguish between the two. One way to accomplish this is to take advantage of the four-byte invisible PASSTHROUGH field. This field is initialized to binary zeros after each call to the output exit routine or when PF10 is pressed to clear the Address Lookup Screen. If the input exit routine never passes binary zeros to this field, manually entered addresses are distinguishable from records read using the input exit.
In the third scenario, the input exit reads input records directly rather than sequentially. A record key is needed to find the desired record. The Addr Key field on the Address Lookup Screen is passed to the input exit in the 40-byte PASSTHROUGH and can be used to provide this information to the input exit routine.
You may want the output routine to delete rather than update a record. Write the output routine to recognize a specific value in the Addr Key field or one of the address line fields as a delete key.
Input from the input exit routine with an exit return code of "00" results in a system attempt to code the incoming address through Finalist. Any other return code value displays on the Address Lookup screen with the returned address data. No attempt is made to code the address through Finalist. If you do not want immediate Finalist processing, return a non-zero code.