ACT Defining a Complex-Level External File Exit
Each complex-level external file has an output exit point available. Standard complex-level external file processing inputs the records in the external file and outputs one Debit File record for each computation code specified in the External File Rate Table.
micsrm140cd
Control is passed to the exit after all of the generated calculations have been performed and just prior to the output of each record to the Debit File so that you can make any changes you may require
If you have specified external file prorating, all prorating calculations are made after the external file output exit is taken. Refer to the Implementing Prorating section for information on prorating.
You can reference any data elements contained within the external file or the Debit File. You can modify only the data elements contained within the Debit File or the NONZERO variable. If the Debit File record is to be output, NONZERO is set to 1; otherwise, it is set to 0. If the total charges for the computation code are zero, the NONZERO variable will have a value of 0 when the exit is taken.
Activate an external file exit by coding a SAS routine in sharedprefix.MICS.SOURCE(ACTUeee), where "eee" is the external file identifier. This is done by selecting Option 5, External File Exit, on the Complex-Level External File Options Menu, or directly through ISPF Edit. Then submit the job EXTFILE in sharedprefix.MICS.CNTL.
If the ACTUeee member exists in sharedprefix.MICS.SOURCE when EXTFILE is processing, the exit will be taken. You must delete the member and submit EXTFILE to deactivate the exit.
Coding Considerations
In coding the complex-level external file exit, observe the following conventions:
- The exit must be a valid SAS routine with no embedded DATA or PROC statements.
- You can only modify data elements in the Debit File and the NONZERO element.
- Do not use a RETURN or a DELETE statement. The invoking routine may not make a single pass through the DATA step for each observation.
The following subsections contain a worksheet and example to help you write the complex-level external file exit.
Complex-Level External File Exit Worksheet
+----------------------------------------------------------------------------------------------------------+ | | | Date: ____/____/____ Administrator: ____________________________________________ | +----------------------------------------------------------------------------------------------------------+ COMPLEX-LEVEL EXTERNAL FILE EXIT WORKSHEET SAS Statements: ____________________________________________________________________________________________________________ ____________________________________________________________________________________________________________ ____________________________________________________________________________________________________________ ____________________________________________________________________________________________________________ ____________________________________________________________________________________________________________ ____________________________________________________________________________________________________________ ____________________________________________________________________________________________________________ ____________________________________________________________________________________________________________ ____________________________________________________________________________________________________________ ____________________________________________________________________________________________________________ ____________________________________________________________________________________________________________ ____________________________________________________________________________________________________________ ____________________________________________________________________________________________________________ ____________________________________________________________________________________________________________ ____________________________________________________________________________________________________________ ____________________________________________________________________________________________________________
Complex-Level External File Exit Example
_____________________________________________________________ +-----------------------------------------------------------+ | Date: __/__/__ Administrator: _________ | +-----------------------------------------------------------+ _____IF CDATE EQ EXPDT THEN NONZERO = 0;________________ ________________________________________________________ _____________________________________________________________