CREATE -+-> FUNCTION ---+-> <external-routine-name> ---------+ +-> PROCEDURE --+ | +----------------------------<-----------------------------+ +-+--------------------------------+-----------------------+ +-> STORED NAME IS <identifier> -+ | +----------------------------<-----------------------------+ +-> ( -+-----------------------+-> ) ----------------------+ ++-> parameter-list --+-+ | +-------- , <--------+ | +----------------------------<-----------------------------+ +-+-------------------+--> --+------------------+-> ; --> -+ +-> returns-clause -+ +-> LANGUAGE SQL --+ | | +----------------------------<-----------------------------+ +----> external-body-clause ----------------------------------> parameter-list = -+----------+-+-------------------+-+-> data-type -----+----------+ +-> IN ----+ +> <parameter-name> + +-> <domain-name> -+ | +-> OUT ---+ | +-> INOUT -+ | +-----------------------------------------------------------------+ +-+---------------------------+--+---------------------+----------+ +-> DEFAULT value-expr -----+ +-> mechanism-clause -+ | +------------------------------<---------------------------------+ ++---------------------------------+-------------------------------> +-> COMMENT IS -+-> 'string' ---+-+ +------ / <-----+ mechanism-clause = ----> BY --+-> DESCRIPTOR -+---> +-> LENGTH -----+ +-> REFERENCE --+ +-> VALUE ------+ external-body-clause = --> EXTERNAL --+------------------------------+-------------+ +-> NAME <external-body-name> -+ | +----------------------------------- <----------------------+ ++-----------------------------+-> LANGUAGE language-name --+ +-> external-location-clause -+ | +----------------------------------<------------------------+ ++-> PARAMETER STYLE GENERAL -+-----------------------------+ +-> GENERAL PARAMETER STYLE -+ | +-----------------------------------<-----------------------+ ++----------------------------+------------------------------> +-> external-body-clause-2 --+ external-body-clause-2 = ---+--+-> COMMENT IS -+-> '<string> ' -+----+--+--> | | +------ / <------+ | | | +-> bind-site-clause -----------------+ | | +-> bind-scope-clause ----------------+ | | +-> notify-clause --------------------+ | | +-> CALLED ON NULL INPUT -------------+ | | +-> RETURNS NULL ON NULL INPUT -------+ | | +-> USAGE IS -+-> LOCAL ---+----------+ | | | +-> GLOBAL --+ | | | +-+--------+--+-------------------+---+ | | +-> NOT -+ +-> VARIANT --------+ | | +-> DETERMINISTIC --+ | +---------------------- <-------------------+ external-location-clause = ---+--> DEFAULT LOCATION ------------+-------------------------+ +--> LOCATION '<image-location>' -+ | +-------------------------------<-----------------------------+ +-+----------------------------->--------------------------+--> +--> WITH --+-> ALL -----+--> LOGICAL_NAME TRANSLATION --+ +-> SYSTEM --+ language-name = --+-> ADA -----+--> +-> C -------+ +-> COBOL ---+ +-> FORTRAN -+ +-> PASCAL --+ +-> GENERAL -+ bind-site-clause = --> BIND ON --+--> CLIENT --+--> SITE ---> +--> SERVER --+ bind-scope-clause = ---> BIND SCOPE --+-> CONNECT ------+--> +-> TRANSACTION --+ notify-clause = -> NOTIFY notify-entry-name --> ON -+-+-> BIND ---------+-+-> | +-> CONNECT ------+ | | +-> TRANSACTION --+ | +--------- , <--------+