1
Functions: An Introduction
Understanding Functions
A function defines a process that operates on files and
fields. Synon/2E allows you to link functions together to
create larger processes that become the building blocks
of your application. Functions are the processes that
operate on files and fields in your database. You can
link functions together as components to define an
application system. You can implement several
separate functions as a single HLL program. There are
two ways that a function can be implemented:
Function Types
There are a number of different function types which
fall into the four classes listed below.
• Standard functions
• Built-In functions
• Function fields
• Message functions
*ADD Add
*COMMIT Commit
*COMPUTE Compute
*CONCAT Concatenation
*DIV Divide
*MODULO Modulo
*MOVE Move
*MULT Multiply
*QUIT Quit
*ROLLBACK Rollback
*SUB Subtract
*SUBSTRING Substring
• Sum (SUM)
• Maximum (MAX)
• Minimum (MIN)
• Count (CNT)
• Derived (DRV)
• User (USR)
• Panel (display)
• Report
Action Diagrams Action diagrams specify the processing steps for the
program function logic. This is a combination of default
(Synon/2E supplied) logic and optional user-defined
processing logic.
Device Functions Y Y Y Y
Database Functions Y N N Y, N(4)
(1) (3)
User Functions Y N Y, N Y, N
Messages Y N N N
(2)
Function Fields Y N Y, N N
Built-in Functions Y N N N
Additional Processing
Synon/2E automatically supplies additional processing
logic when building functions in your model including
integrity checking, validating data entered in the fields,
and linking functions.
Field Validation Validation attributes specify how data entered into the
field is to be validated. Validation includes both the
attributes supported by OS/400, such as upper/lower
case checking, modulus checking, OS/400 valid name
checking, and validation through a check condition. You
can define additional field validation logic for any field
type and automatically incorporate it in any function
using the field.