Professional Documents
Culture Documents
SYNON Commands
Any command in Synon starts with Y. e.g.
YSTRY2, Y2, YEDTMDLLIB,
YDSPMSLVAL,YBLDLIBLST , YHLLGENetc.
Synon objects are not AS/400 objects e.g. Files,
Fields, Relations etc.
Synon follows RPM & not Waterfall
methodology.
Synon is a Data driven approach and not process
driven approach. Here you first define the data and
process is based on it.
Generating / Compiling
SYNON
Data Model contains Files, Fields and their
relations.
Design Model contains data model and all
other functional specifications.
SYNON
ADDLIBLE Y2SY
ADDLIBLE Y1SY
YCRTMDLLIB
MDLLIB(XXX)
SYSTEXT(My Model)
YSTRY2
XXX
SYNON
Modes available:
Designer, Programmer
Till version 6.0 , at one time only one Designer
can go into the Data Model. At that time no body
else should be using the model. This is to
synchronies the model.
In version 7.0 any no. of people can go as a
Designer. It depends on the setting in the model
value. There is a data area in which this
information is kept. After making changes in the
model , the model has to be synchronized.
Otherwise it will not be reflected to other
programmers.
Objects
Files
:
Entity
Fields
:
Attribute
Key Field:
CDE
NonKey :
ATR
First thing required is to Define your Entity and
Attributes.
DFN----Defined as for any Entity
Here you mention whether the Entity is REF or CPT.
Also mention whether the Attribute is KEY or
NonKey Field.
SYNON FILES
SYNON RELATIONS
Key Field
Non Key Field
Virtual Field
Audit fields
SYNON RELATIONS
SYNON DataTypes
Different data types are available for attributes:
Key field
CDE
NonKey
ATR
For fields:
CDE
TXT
NBR
STS
DTE
TME
VAL
Referenced Field
PHY
UPD
RTV
QRY
SPN
RSQ
Virtual Field
To be a virtual field, 2 files should have either Owned by
or Refers to or Extended By relation.
Virtual field is only for output.
Virtualization is done only when a field is declared
somewhere and it is required for display.
It can also be used in case of adding a new field in the
Entity.
Virtualization doesn't mean it is going to be added in the
access path. It has to be added explicitly in the A/C path.
Virtual not allowed for UPD and RTV.
Generation/Compilation
Once the A/C path is defined or created, either by the
system or programmer/designer, it has to be generated. J/G
is the compilation option where J is for batch compilation
and G is for interactive compilation. Before compiling if
you try to see the DDS there will be nothing . As soon as
you select J for batch generation, a member will be created
by the system and spool file is generated by the name
YGENSRC. After that the system will automatically create
an object by the same name . And now it becomes AS/400
objects. In case of interactive compilation, system will
create the member and the object in one shot. If any error
then check the spool file.
Every Access path should be compiled or it should be an
object.
Example
A defined as(DFN)
A
If you don't define it at the beginning you can do it later as
well. After entering all relations for files, system says not
defined.
A
Known By(K)
B(Key field)
A
Has
C(Non key field)
A
Has
D(Non key field)
A
Owned By(O)
Z(Key field)
A
Refers to
X(Non key field)
A
Includes
J(Non key field)
A
Qualified By
X(Key field)
Example
Take F10 to define objects. Once it is done then define
data types for attributes.
F3 to exit and then system asks for whether model has to
be synchronized. It is preferred to synchronize the model
so that this can be seen by others.
Now Z into file which will generate 3 A/C paths i.e.
PHY,UPD,RTV by default . J for batch generation.
F into file will generate functions .
SYNON FUNCTIONS
F into file will generate functions for that particular entity.
REF file will have 5 functions generated by the system and CPT will
have 3 functions by the system .
Functions are nothing but programs. These programs are generated in
the language depending on the model setting i.e. YHLLGEN.
There are different types of functions
EXTERNAL FUNCTION
INTERNAL FUNCTION
MESSAGE FUNCTION
SYNON FUNCTIONS
DSPFIL
DSPTRN
DSPRCD
EDTFIL
EDTRCD
EDTTRN
PMTRCD
SELRCD
PRTFIL
EXCEXTFUN
EXCUSRPGM
RTVOBJ
CHGOBJ
CRTOBJ
DLTOBJ
PRTOBJ
EXCINTFUN
EXCUSRSRC
FUNCTIONS
DSPFIL,DSPRCD,DSPTRN,EDTFIL,EDTTRN,EDTRCD
,PMTRCD,SELRCD are display functions.
PRTFIL,PRTOBJ are print function.
RTVOBJ,CRTOBJ,CHGOBJ,DLTOBJ are database
functions.
EXCUSRPGM is a user written program in any language.
EXCUSRSRC is an internal function written by user. But
is has to be with same language in which it is written or
called.
EXCEXTFUN is mostly used for Batch processing.
EXCINTFUN is used for LDA processing or date
validation.
FUNCTIONS
CRTOBJ,CHGOBJ,DLTOBJ use only UPD A/C path.
FUNCTION OPTIONS
Many Function Options are available depending on the Function e.g.
Database function, Display Function, Print Function, External
Function, Internal Function.
These function options are required to manage the function.
Function Parameter
There can be a maximum of 9 parameters passed to any
function. If you want to pass more than 9 then use Array.
Role
Input(I)
Output(O)
Both(B)
Neither(N)
Neither parameter is not allowed with EXCUSRSRC /
EXCUSRPGM.
It is used in case of changing only certain fields from the database
It is used as an output field on the display screen
It can be used as a WRK Context.
Function Parameter
Function Parameter
CONTEXT
A context is nothing but the location of a field. There are
several contexts available here.
DB1
DTL
DB2
PAR
RCD
NLL only for output
CTL
WRK
LCL
JOB
PGM
ARRAY
Array is same like what we use in RPG.
It is a shipped file.
It has maximum of 1000 elements . The default is
100. It has to have a key . Default is Ascending. It
could be Unique or No unique.
It has RTVOBJ, CRTOBJ, CHGOBJ, DLTOBJ.
Functions can be created on *Array file.
Features
To retrieve an existing application on
AS/400 to Synon, use YRTVPFMDL which
will copy the DDS into the model.
Commitment Control is taken care by
Synon.
Inter-dependency among all objects
Uses native Configuration Management
Object Reference *PRIVATE/*PUBLIC
LIMITATIONS
Mathematical Calculation
Cannot change the Action diagram
Etc.