Sie sind auf Seite 1von 31

SYNON Day 1

Agenda
1. Introduction to SYNON
2. File Types
3. File Relation
4. Relation Entries
5. Creating and compiling files
6. Hands on - Logon and File creation

Part 1 -Reference Material

What is SYNON
An application development tool
Abstract patterns present as building blocks
Automatically generate the components of an
application
Generates sophisticated high-level language
code in RPG or COBOL without any developer
intervention
Also generates the SQL or DDS code to define
the necessary database tables and views.

Features

Design Application model


Easy/Rapid
Platform independent
Maintenance
Re-use
Flexible

File Type
Database Files
Reference (REF)
Master files
Relatively static / Non-volatile data
e.g. Product, Employee,Customer

Capture (CPT)
Transaction files
Large volume of data
Frequently updated
e.g. Order

Non-Database Files
Structure (STR)
Has field definitions
Never compiled
Included in other files
Re-use
e.g. Audit Stamp file

File Relation

Defined as
File-to-file relation
Defines a file as existing in the data
model.
2E automatically creates a Defined
as relation when other relations
entered by the user imply a new file
has been defined.
e.g. Employee

Defined as

Employee

Owned by
File-to-file relation
Denotes a parent-child relationship
Primary key(s) of owning file become
part of primary key of the owned by
file
e.g.

Order Detail

Owned by

Order

Known by
File-to-field relation
Declares the field to be present as a
key field on the file.
This relation defines a primary key of
a file.
e.g.

FIL Order

Known by FLD Order Number

Qualified by
File-to-field relation
Declares a field to be present on a file
as a key field; is used with continuous
variables.
Similar to Known by.
Used to retrieve nearest value
(*Previous/*Next).
e.g. Product Price Owned by Product Code
Product Price Qualified by
Effective date

Refers to
File-to-file relation
Primary key of the referred file becomes
foreign key in the referring file
Allows access to any of the fields on the
referred to file from a referring file
Virtual field is created in the referring file
and cannot be updated from the referring file
e.g. Order
Refers to Customer
For: Ordering Sharing: *ALL
Order
Refers to Customer
For: Invoicing Sharing: *ALL

Refers To - Involution
Self Referencing relation
Eg: Every Employee is assigned to a Manager. A
manager is also an Employee to the Organization
Fil Employee Known by FLD Emp No.
Fil Employee refers to Employee
For Manager
Sharing *None

For field
The For field lets you specify the reason for each
relation.

Refers To - Sharing
The entry in the Sharing field indicates
whether the common keys of the two
relations are to be shared.
*ALL is the default. This field applies only
when the referenced file has more than one
key field entry
Eg: Every Employee has a manager and belongs to a
department
The Manager is also an Employee
The Manager and the Employee should belong to the
same department

Fil Employee Known By Emp No


Fil Employee Known By Dept ID
Fil Employee Refers To Employee
For: Manager Sharing *ALL

Here Manager Emp code can be


added as manager only of he belongs
to the same department as the
Employee

Includes
File-to-file relation
File includes all the fields of a
structure (STR) file
e.g.

Product

Includes

Audit Stamp

Has
File-to-field relation
Declares the field as a data field on
the file.
Defines a non-key field, or attribute.
e.g.

FIL Order

Has

FLD Quantity

Extended by
File-to-file relation
Declares a file to be extension of another
file
If used with Owned by relation, the fields
of the extended file are available as
Virtual Fields in the file being extended
New file would be an extension of the
main file.

e.g.

Customer

Extended by

Customer Detail

Part 2 Hands on

Logon to training model using


YSTRY2 T1MDL

Login as Designer
Use Menu Option1 Edit Database Relations to
make changes in the model
Create files for the below mentioned
specification
RACE is Owned by COURSE.
COURSE is uniquely identified by a Course code.
Since RACE is Owned by COURSE, each RACE is
uniquely identified by a combination of the COURSE
at which it is run, a date, and a time.
As a result, the primary key for RACE consists of
Course code, Race Date, and Race Time.

Various Entities (Files), attributes (fields), and


relationships (relations),

You only need to type the first letter of a


relation; for example, you can type K or O in
place of Known by or Owned by,
respectively.

An error message for the first undefined item


Course type FIL not found is displayed at the
bottom of the panel.

You will use the F10 key to define the objects


you just entered. First, press F24 to display more
function keys.

An error message for the first undefined item


Course type FIL not found is displayed at the
bottom of the panel.

Press F10 to display the Define Objects panel where


you will enter the details needed to define the
objects.

You can view the entries on the COURSE file using


the Edit File Entries panel. From the Edit Database
Relations panel, type E next to any of the
relations for the COURSE file.

Similarly create files RACE ENTRY, HORSE, and


JOCKEY

To obtain the details of the referenced object take


Z2 from Edit Database Relation

Use the F6 command key to toggle between


showing and hiding relation extension lines
Horses parents are also horses, to record the
horses parents requires two HORSE Refers to
HORSE relations, one for each parent. This is
shown in the following diagram.

The two HORSE Refers to HORSE relations can be


distinguished by extending the Refers to relations
and defining For text. To do this, type + next to
each of those relations.

The two HORSE Refers to HORSE relations are now


shown in an extended form that allows you to
specify two extra terms on the relation.

Take E against the relation and check the Dam Horse


Code and Sire Horse Code. These fields have been
added and referenced to the field Horse Code

Thank You

Das könnte Ihnen auch gefallen