SYNON Tutorial: Extracted From CA 2E Tutorial r8.5
SYNON Tutorial: Extracted From CA 2E Tutorial r8.5
• Library List
• Your library list must include certain libraries before you can
create an CA 2E design model; for example, the CA 2E and
Toolkit product libraries. Refer to the worksheet that was
filled out when CA 2E was installed at your company for a list
of the required libraries. The worksheet is in the Installation
Guide. You can add any missing libraries using the i OS Add
Library List Entry (ADDLIBLE) command. For example,
• ADDLIBLE Y2SY
• ADDLIBLE Y1SY
• Creating an CA 2E Design Model
• You must have an CA 2E design model library in which to store
your CA 2E design model. If you do not already have a design
model you may create a new one using the CA 2E Create
Model Library (YCRTMDLLIB) command as follows:
• YCRTMDLLIB MDLLIB(MYMDL) OBJPFX(MY)+
• SYSTEXT(‘My Model’) DSNSTD(*CUATEXT)
• This command allows you to create your model interactively.
You can also do this as a batch process. In this example the
design standard, *CUATEXT, has been specified so that all
functions that include interactive panel displays will be
presented with either Action Bars or Windows. The normal
default for the design standard is *CUAENTRY.
• The message “Model library MYMDL created” should appear
following successful completion of the command. The use of this
command is only necessary when you are creating a new CA 2E
design model. The next topic discusses how to access an existing
CA 2E design model.
• The YCRTMDLLIB command also creates a library to contain the
source and application objects that you will generate from your
CA 2E design model. The name of this library is given by the
GENLIB parameter, which in this case defaults to the name
MYGEN. Furthermore it creates a Toolkit Library list with the
same name as the CA 2E design model library.
• You can view how CA 2E has resolved your relations by displaying the
entries for the file.
File Entries for COURSE
• 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.
File Entries for RACE
Adding More Relations
• You may now add other files to the data
model.
Declaring More Files
• You can define the RACE ENTRY, HORSE, and JOCKEY files
using the Known by, Has, and Owned by relations as you
did for the COURSE and RACE files.
• In addition, since RACE ENTRY requires references to the
HORSE and JOCKEY files, you will also use the Refers to
relation. The Refers to relation specifies a relationship
between two files. It causes the key entries of the
referenced file (HORSE and JOCKEY) to become foreign keys
of the referencing file (RACE ENTRY).
• Note that a file may reference another file more than once,
as shown later in this tutorial.
Defining Objects
• Press F10 to define the new objects.
• The Define Objects panel displays with the
object attribute column blank.
• File Attributes
– Specify the appropriate object attributes, in order
to define the new objects to CA 2E. This requires
the following two additional attributes:
• CPT—Database capture file
• NBR—Pure numeric field value
Defining Objects
(Continued)
Deleting Relations
• You can delete a relation from the data model
by typing D against the relation. Once deleted,
retyping them can reinstate relations.
Documenting Relations
• To obtain a listing of the relations that you have entered, use the
Document Model Relations (YDOCMDLREL) command. First press
F17 from the Edit Database Relations panel to display the Display
Services Menu. Then do either of the following.
• Press F9 to display a command entry line, type the YDOCMDLREL
command, and press Enter
• Select the Documentation menu option to display a list of
documentation commands and select Document model relations
• When you finish, press F3 until you return to the Edit Database
Relations panel.
Field Details and Conditions
• Having entered relations to define your data
model, you must now add more detailed
information about the fields. This includes defining
simple validation rules and specifying any required
overrides to the defaults CA 2E assigned for field
properties; for example, field length.
• This topic describes the field details and how to
add field condition information to your data model.
Field Details and Conditions
(Continued)
• New terms introduced:
– field condition
– VAL condition type
– LST condition
– check condition
– selection line
• New panels introduced:
– Edit Field Details
– Edit Field Conditions
– Edit Field Condition Details
Field Details and Conditions
(Continued)
• Overview of Field Details
• Field details specify the properties of a given field, such as length, text,
validation, and implementation name.
• Overview of Field Conditions
• Field conditions define allowed values for fields. Conditions record both
the values that a field may take and the meaning that the values
represent.
• Conditions can be used in a number of ways. The most common uses of
conditions are:
• Validating the entry of data
• Specifying selection or omission of data from a logical view of the data
• Specifying the processing conditions in a program that operates on the
data
Field Details and Conditions
(Continued)
• Field Details
• To obtain the field details for a field, select the
appropriate relation statement line on the Edit
Database Relations panel and type Z2 against
this object. The details of the referenced
object will be displayed. Note that the Subfile
selector options, Z1 and Z, both give details of
the first object in the relation.
Field Details and Conditions
(Continued)