Professional Documents
Culture Documents
Access path is path through which you can retrieve records. There are 6 types of access path is
supported by SYNON. By default Synon creates 3 access path namely Physical, Update and
Retrieve access paths.
1. ‘PHY’: Physical file: Arrival sequence access path defining the based-on file. For a given
AllFusion 2E file there may only be one access path of type PHY - the path will automatically be created by AllFusion
2E.
2. ‘UPD’: Update: Access path used for update. Path is keyed on AllFusion 2E fields that identifythe file. For a given
AllFusion 2E file there may be several different access paths of type UPD, each containing a different combination of
fields. A default update path containing all fields will automatically be created by AllFusion 2E.
3. ‘RTV’: Retrieval: Access path used to retrieve records from file. The key order cannot be
changed. For a given AllFusion 2E file there may be many access path of type RTV - a default path, keyed on the
identifying fields for the file, will automatically be created by AllFusion 2E.Each ‘RTV’ access path has an associated
'UPD' access path.
4. ‘RSQ’: Resequence: Access path used to retrieve records from file using an alternative key order. For a given
AllFusion 2E file there may be many access paths of type 'RSQ'.
5. 'QRY' : Query: Access path used to retrieve records from file using an alternative key
order which may include virtual fields. For a given AllFusion 2E file there may be many
access paths of type 'QRY'.
6. ‘SPN’: Span: Access path used to span several different files using an alternative key order.
For a given AllFusion 2E file there may be many access paths of type 'SPN'
We cannot pass a parameter with VRY type when we call an EXCUSRSRC. Because USRSRC is a internal function,
while compiling the PGM, it may give length mis-match error will come.
Using this you can activate “Confirm prompt” Prompt, passing initial value to the prompt,
commitment control, send error message, copy the message back to the previous PGM message queue, reclaim the
resource, closing the program, bypass key screen etc
How to use execute user source and to use parameters in this function?
Execute user source specifies user written high level language source code is to be included within source code
generated by a calling function. If the external source is RPG, then it should be in QRPGSRC. If it is a COBOL
program, it should be in QCBLSRC. The parameters should be 6 characters long. The first character to be #,
followed by I [Input] / O [Output] / B [Both] that last four characters being user defined. Indicators should not be
conflicting.
What is CUR and NXT contexts used in PRTFIL and PRTOBJ functions?
NXT: The NXT context defines a context relative to the CUR context of AllFusion 2E report
functions: the NXT context contains the fields which are in the report format one level break
higher. (See section on the CUR context for an explanation of report formats.) It can therefore be used to specify
that the result of An AllFusion 2E field function (SUM, MIN, MAX, etc) is to be placed onto an appropriate report
total format.
The NXT context may be used only for result fields.
CUR: The CUR context contains all the fields which are in a given report format of A AllFusion 2E report function.
A print object function is linked to a print file by typing the line command T on the panel for the print file to see the
structure of the print file. In that, insert print object function using IA or IB.
Print file function allows you to print all the records from a file. We can specify 13 levels of totalling. Maximum of 13
print objects [PRTOBJ] can be used within a print file. Control breaks are defaulted based on the number of keys
specified
It is a type of function, using this we can send messages to Workstation using synon/2e. The message function has
a. Send error message (using this we can pass a error message to the message queue)
b. Send information message (using this we can pass a information message to the message
queue)
c. Send completion message (when a job is completed this message will appear)
d. Send status message (it gives information about the long running program’s status to the
message queue)
e. Retrieve message (it retrieve a message from message file to the function, using this you can concat even 2
database fields)
f. Execute message (Request message to be executed by the calling function)
A function field is a field whose value is not physically stored in database. But is derived from other fields or files.
Using this we can,
a. SUM
b. Maximum
c. Minimum
d. Count
e. Derived
f. User
Using Built in function, you can do all arithmetic operations, string manipulations and control operations like
Commit and rollback.
*ADD
*SUB
*COMMIT
*COMPUTE (Using this we can do all arithmetic operations like add, sub, mult & div)
CONCAT (It joins 2 string with the conditions (*none = no blanks, *one = leave one blank, *all =
leave all blanks))
*CVTVAR (It just converts the value of one type to another type)
*DATE DETAILS (It gives the date details like day of week, day of year, *month, leaf year etc)
*DATE INCREMENT (Using this we can add quantity of a given date and find out new date)
*DIV
*DIV WITH REMAINDER (Remainder value will move to another value)
*DURATION (It calculates duration between 2 dates)
*ELAPSED TIME (It calculates time (HH, MM, SS, MS) between 2 given time)
*EXIT PROGRAM (Leave)
*MODULO (It gives only remainder value)
*MOVE
*MOVE ALL (Move value (even constant) to variable(s))
*MULT
*QUIT (It is like a goto statement in RPG, it leaves from the entire action diagram)
*ROLLBACK (The changes will not be reflected when you use *ROLLBACK)
*RTVCND (It specifies that the name of a given condition is to be retrieved into a function field)
*SER CURSOR (It is equal to cursor position keyword in SDA)
*SUBSTRING (Using this we can take a part of string from the base variable)
*TIME DETAILS (It is similar to date details Built in function)
*TIME INCREMENT (Using this we can add a quantity to a given time)
Using this function, you can incorporate User written programs and subroutines into the Synon/2e generated
applications. You can include these functions inside the action diagram or User written
HLL.
a. Execute internal Function
b. Execute User Source
c. Execute External Function
d. Execute user program
Device function is a function, using this you can design the Panel (Workstations) and Report
design. It has both internal and external functions.
a. Print object
b. Display record
c. Display record 2 panel
d. Display record 3 panel
e. Prompt record
f. Edit record
g. Edit record 2 panel
h. Edit record 3 panel
i. Display file
j. Edit file
k. Select record
l. Display transaction
m. Edit transaction
n. Print file
Standard functions specify the program and subroutines. User can write his won codes in the User
point in the action diagram.
a. Database functions
b. Device functions
c. User functions
What are the default functions created for REF and CPT file?
REF File: Create object, Change object, Delete object, Edit file and Select record
CPT File: Create object, Change object and Delete object
How do you delete a access path which is referred by some other access path?
We cannot delete an access path which is referred by some other function/access path. If you want to delete, you
have to remove the (REF) relations then delete.
Temporary lock – when PGMR open the function/access path, that function will be locked temporally.
b. Permanent lock – if the Designer has Object Ownership authority, he can implement permanent lock
What are the Access Path auxiliaries for query Access path?
Access Path auxiliaries are the three different OS/400 objects used to implement a query access path. They are
logical file, physical file and control language.
Access Path Selection is the process that specifies which records from a file are included in the Access Path.
Selection is made up of a number of select / omit criteria, each of which are based on one or more conditions.
Static Selection: is built into access path.
Dynamic Selection: is not built into the implementing OS/400 access path, but it is applied at run time. Dynamic
selection is less efficient than static selection, but may help to reduce the number of
OS/400 access paths that are required.
While generating QRY access path how many members being created.
For mapping it creates Physical file (PF), Logical file and it creates a QRY in CL program.
Using which access path you can define a virtual field as a key?
What are the access paths will allow changing the key order?
RSQ, QRY and SPN access path will allow changing the key order.
Access path is path through which you can retrieve records. There are 6 types of access path is
supported by SYNON. By default Synon creates 3 access path namely Physical, Update and
Retrieve access paths.
1. ‘PHY’: Physical file: Arrival sequence access path defining the based-on file. For a given
AllFusion 2E file there may only be one access path of type PHY - the path will automatically be
created by AllFusion 2E.
2. ‘UPD’: Update: Access path used for update. Path is keyed on AllFusion 2E fields that identify
the file. For a given AllFusion 2E file there may be several different access paths of type
UPD, each containing a different combination of fields. A default update path containing all
fields will automatically be created by AllFusion 2E.
3. ‘RTV’: Retrieval: Access path used to retrieve records from file. The key order cannot be
changed. For a given AllFusion 2E file there may be many access path of type RTV - a default
path, keyed on the identifying fields for the file, will automatically be created by AllFusion 2E.
Each ‘RTV’ access path has an associated 'UPD' access path.
4. ‘RSQ’: Resequence: Access path used to retrieve records from file using an alternative key
order. For a given AllFusion 2E file there may be many access paths of type 'RSQ'.
5. 'QRY' : Query: Access path used to retrieve records from file using an alternative key
order which may include virtual fields. For a given AllFusion 2E file there may be many
access paths of type 'QRY'.
6. ‘SPN’: Span: Access path used to span several different files using an alternative key order.
For a given AllFusion 2E file there may be many access paths of type 'SPN'.
What are the sharing options available for Owned By relation and Explain?
File to File Relations: Owned by, Includes, Refers to and Extended by relations.
Qualified by is a key relation. It is used to qualify a file identifier by one or more variable factors. It is used to get
the nearest, previous or next nearest record based on whether *NEXT or *PREV is specified. The field redirection
should be done in the referring file. The *NEXT is implemented as SETLL and READ. The *PREVIOUS is implemented
as SETGT and READP.
Field Relations is used to describe the key as well as non-key attributes of a file.
Known by: define a key attribute of a file.
Qualified by: define a key attribute for a file
Has: define a non-key field for a file
Owned By - Implements the parent child relationship. The key field of the owning file becomes a
primary key of the owned file.
Refers to - the key field of the referring file become the non key attribute of the referred file.
REF file is like a master file. CPT file is like a transaction file.
How many types of files are available in Synon/2e?
Cardinality specifies whether the connection is one to one, one to many or many to many.
What is a DOMAIN?
The set of possible values an attribute can take is the 'domain' of the attribute.
Virtual fields are logically present in one file and physically present in another file. This is valid only for OWNED BY
and REFERS TO relation types
It is used to further clarify a relationship. Owned by, Qualified by and Refers to can only have the FOR TEXT. To
prevent duplicate fields SYNON uses the FOR TEXT if present or the Surrogate number
Defined as: Declaration that the file exist and created implicitly by SYNON
Known by: Specifies that the field is a key field. There can be more than one known by relation
Owned by: Defines a parent and child relationship, Eg., Order header and order details (parent key will be copied to
the child)
Qualified by: This is a key relation used to qualify a file identifier by one or more variable factors. This is used to
find out a close match (Eg., rate, discount, data, etc.). If no redirection is specified it is similar to KNOWN BY
Refers to: Specifies a file refers to another file (Foreign key)
Includes: A file is to include all the fields that have been declared in the structure file
Extended by: Declares a file to be an extension of a file relation. It gives an association between one to one or one
to none. Will work only if it is OWNED BY in the second file
Has: Declares a field to be present in a file
RELATION SEQUENCE AT THE TIME OR RESOLVING
Defined as, Owned by, Qualified by, Extended by, Refers to, Has, Includes
Types of contexts
1. DB contexts: DB1 & DB2
2. Device contexts: CTL, RCD, DTL, 2ND, 3RD, CUR, NXT, KEY
3. System contexts: JOB, PGM
4. Program contexts: PAR, WRK
5. Literal contexts: CON, CND
Copy back messages specifies whether any messages outstanding on the programs message queue is to be copied
back to the previous programs message queue when the program terminates
Commitment control can be implemented by specifying our option in function options. There are three options
available viz.
1. MASTER - By choosing this option the program will run under commitment control. This program will contain
appropriate commit points which will be defined in the SYNON supplied program Y2BGCTL
2. SLAVE - The program will run under commitment control. No automatic start or commit points are included.
Commit points can be added using commit built-in function
3. NONE - The program does not run under commitment control. Hence, there are no commit points.
What are function options close down program & reclaim resources?
Close down program: Specifies whether the last record indicator is to be set on when the program finished
execution. If, 'Y' is specified, all files are closed and the program is shutdown. If blank, all files remain open and a
subsequent call will be faster and perform a full program execution. In either case, all internal variables are
initialised to blanks and zero on each call.
Reclaim resources: The OS/400 command RCLRSC is to be invoked when the program completes execution. The
command closed down any other program, files that have been called and/or opened by the program thereby
reallocating their storage. Reclaim resources is valid only on external function. This does not support COBOL
programs
What are the various access path maintenance methods?
Qualified by is a key relation. It is used to qualify a file identifier by one or more variable factors. It is used to get
the nearest, previous or next nearest record based on whether *NEXT or *PREV is specified. The field redirection
should be done in the referring file. The *NEXT is implemented as SETLL and READ. The *PREVIOUS is implemented
as SETGT and READP.
Print file function allows you to print all the records from a file. We can specify 13 levels of totaling. Maximum of 13
print objects [PRTOBJ] can be used within a print file. Control breaks are defaulted based on the number of keys
specified.
Execute user program is a connection between a HLL user written program and SYNON function. Neither parameter
is allowed. Parameter passing is normal
Execute message function allows a request message to be executed by the calling program. The command is
entered in the second level message. The message type should be "EXC". Override functions are not possible. For
Open query [OPNQRY] and open database [OPNDBF] you should specify a value of the *PERM to prevent closure of
file
How to use execute user source and to use parameters in this function?
Execute user source specifies user written high level language source code is to be included within source code
generated by a calling function.
If the external source is RPG, then it should be in QRPGSRC. If it is a COBOL program, it should be in QCBLSRC.
The parameters should be 6 characters long. The first character to be #, followed by I [Input] / O [Output] / B
[Both] that last four characters being user defined. Indicators should not be conflicting.
Execute internal function allows you to specify a portion of your action diagram that can be used repeatedly.
Implemented as a macro function internal source code in calling function. No access paths can be attached
1. Relative
2. 2. Absolute
What is the maximum number of PRTOBJ functions that can be added to one PRTFIL
function?
13
A print object function is linked to a print file by typing the line command T on the panel for the print file to see the
structure of the print file. In that, insert print object function using IA or IB.
Can a print object function be embedded within another print object function?
(True/False)
True
What is the maximum number of Level heading formats and Level total formats that can
be defined in a print file?
How many report heading formats can be defined per print file? Of those, how many can
be dropped?
Only one report heading format is defined in a print file. The report heading format cannot be dropped.
What are the access paths on which Print file can be based on?
What are Message Functions? What are the different types of message functions?
Means of defining messages of various types, specifying different message files for the message, specifying
substitution variables and changing message identifiers.
The notepad utility allows us to copy constructs from one action diagram to another. When using open functions this
utility lets us save the contents of a diagram to a work area and copy those contexts elsewhere
Explain Context
Database Contexts - instances of same database field available in more than
one file
Device Contexts - instances of same device field available in more than one
format
Literal Contexts - instances of field available from
instances of a field that are available for use at a particular processing step
What are constructs?
Constructs are the basic building blocks of action diagrams. By combining different types of constructs we define
the procedural logic of an action diagram. The combination constructs are:
1. Sequential
2. Conditional
3. Iterative
User points are places where we can insert logic into the action diagram to add processing that is specific to that
function.
Give any 4 line commands that can be used in the action diagram panel?
We can view the action diagram of a given function by typing F at the edit database relations panel against the
required relation.
Message functions define messages that have to appear at a workstation using SYNON/2E facilities.
A Function field is a field whose value is not physically stored in a Database, but is derived from other fields or files.
Eg. SUM, MAX, MIN etc.
Built-in functions execute common low-level functions such as arithmetic operations, character string manipulation
and control operations such as Commitment Control and Program exit.
User functions provide a means of incorporating user programs and subroutines into SYNON/2E generated
applications.
Device functions specify interactive programs and Report Programs. These programs consist of either a Panel design
or Report design and an Action Diagram
1. Database functions.
2. Device functions.
3. User functions.
4. Built-in functions.
1. Standard functions.
2. Built-in-functions.
3. Function fields.
4. Message functions.
File type is the description of how the file will be used. The various file types are Structure (STR), Reference (REF),
and Capture (CPT).
1. VAL
2. LST
Condition is a value that specifies the circumstances under which an action or a set of actions is to be executed
Re-synchronization is the expansion of relations to rebuild the file entries for all files in a model.
1. Has Relation
2. Known by relation
3. Owned by relation
4. Refers to relation
The SYNON/2E Relations establish the relationships between fields and files and files and other files.
Field usage is given when referring to a field with a relation. The several categories of usage are DB keys (CDE), DB
attribute fields (ATR) and various function field usages.
Field type is an assigned type, which defines the type of the data that the field represents. The different field types
are CDE, NBR and QTY.
Name the access paths created automatically for every REF or CPT file.
Access Path Selection is the process that specifies which records from a file are included in the Access Path.
Selection is made up of a number of select / omit criteria, each of which are based on one or more conditions.
What are the Access Path auxiliaries for query Access path?
Access Path auxiliaries are the three different OS/400 objects used to implement a query access path. They are
logical file, physical file and control language.
1. Immediate
2. Delay
3. Rebuild
The purpose of an access path is to retrieve, sequence, filter or update data in physical or logical files
An access path is a view of data in a physical file, in a given key sequence, implemented as an OS/400 physical or
logical file.
What is a Virtual field?
A virtual field is a field that is logically present but physically not present on an access path.
What is differentiation?
Differentiation is the process in data modelling of creating new entities by splitting a current entity into two
separate entities.
What is Assimilation?
Assimilation is the process of retrieving existing externally described OS/400 file definitions to SYNON/2E design
model
An integrated development environment for AS/400s originally introduced in 1988 by Synon, Inc., Larkspur, CA
(derived from and pronounced "sign on"). As the dominant tool for the AS/400 platform, it provided an upper and
lower CASE environment that generated COBOL and RPG code. Founded in England in 1983 by Simon Williams,
Synon also built the Obsydian product, an object-oriented PC-based environment that is used to develop C++ code
for Windows clients and RPG code for AS/400 servers.
In 1998, Synon was acquired by Sterling Software, in turn purchased by Computer Associates in 2000. The Synon
products were first re-branded as CA's COOL:2E and COOL:Plex technologies and later Advantage 2E for iSeries
400. In 2004, they became AllFusion 2E and AllFusion Plex.