4. CA MICS Facilities › 4.3 User Exit Facilities › 4.3.1 Definition and Methodology
4.3.1 Definition and Methodology
CA MICS exit points are provided to permit the addition of
user code at key points in the execution of CA MICS.
Within CA MICS, you may implement user code which is to be
used throughout all database units in the CA MICS database
complex, or you may selectively implement code to be used by
a single database unit only. Your careful attention to the
structure of the CA MICS complex libraries and the exit
routines will assure the successful operation of your code.
The text in the following sections makes many references
to SAS language macro processing. All references to SAS
macro processing use the same terminology.
o The term "SAS Macro Statement" is used to refer to the
macros in use before SAS Version 82, which were coded in
the form
MACRO name ...content... %
o The term "SAS Macro Language" is used to refer to the
macro language delivered with current levels of SAS.
This language includes both %MACRO constructions and
global variables. These are constructed in the form
%MACRO name;
...content...
%MEND name;
or
%LET name = ...content... ;
o The term "SAS Macro" without the reference to statement
or language is used to refer to the concept of inserting
variable code into CA MICS programs.
The DOs and DON'Ts below remind you about SAS coding
techniques.
**** D O the following: ****
DO: Use a double percent sign (%%) when attempting to
code a single percent sign within a SAS Macro
Statement (but not with SAS Macro Language). SAS
senses this inside macro code and converts the
compiled constant to a single %.
DO: Use the member supplied in the distributed version
of the prefix.MICS.USER.SOURCE library as the
starting point for your database unit local exits.
DO: Use the member supplied in the distributed version
of the sharedprefix.MICS.SOURCE library as the
starting point for your complex-wide exits.
DO: Liberally comment all code.
DO: Examine input record length to be sure INPUT
requests can be satisfied from the current record.
DO: Reference input field locations with pointer logic
where possible.
DO: Preserve data element integrity by type (numeric,
time stamp, character variable) and range (having
the value agree with the FORMAT and LENGTH
specifications).
DO: Define new retained data elements by specifying
the RETAIN statement after LENGTH and FORMAT
statements, if applicable.
DO: Test all exit logic under the CA MICS-required SAS
release BEFORE implementation into production.
DO: Call the CA MICS Product Support Group if you have
ANY questions.
**** D O N ' T do the following: ****
DON'T: Define SAS macros in your exit code. SAS will
not allow a macro to be defined within a SAS
macro statement definition.
DON'T: Use columns 73-80 for SAS statements. CA MICS
uses only 1-72.
DON'T: Code these SAS statements in your exit: RETURN,
DELETE, or INPUT without a trailing '@'.
DON'T: Code INPUT statements that could cause SAS
to perform an automatic input statement skip.
Use the RECLEN variable to be sure the record is
big enough to contain data at any intended input
offset.
DON'T: Forget the CA MICS naming standards, especially
for DDnames, file names, and data element file
prefixes.
DON'T: Assume that any data element is RETAINed or
not RETAINed.
DON'T: Redefine any currently existing CA MICS data
element unless the documentation of the specific
exit in question says it is allowed.
DON'T: Assume that the SAS automatic variable _N_
contains the actual input observation number.
DON'T: Assume that setting the SAS automatic variable
_ERROR_ will cause an input observation to be
ignored or CA MICS processing to terminate.
DON'T: Use SAS language features not supported by the
SAS release specified for use by the CA MICS
update process.