synon questions with answers

9
General: From a command line how would you go about entering a Synon/M model? YSTRY2 What are the types of Synon/2E user (Class)? *DSNR, *PGMR, *USER How do you restrict *DSNR access to a model? Restrict Management authority to data area YMDLLIBRFA Y MODEL LIBRARY RESTRICT FURTHER ACCESS Before changing parameters on an existing function, what should be checked and how do you check it? All referencing functions must be modified to accept the new or changed parameters. Place a "U” (Usages) against the function; this will display function references. How do you retrieve all the object references to a function? Place an ‘R’ (References) in front of the function to get all the object references to this function. What is the difference between function options Reclaim Resources and Closedown Program, and how should they be implemented? Closedown program sets on the LR indicator in the generated RPG source, and reclaim resource (RCLRSC) will close down any programs still open that are below the current program in the invocation stack. document.doc 1 Additional Questioons Section

Upload: sriram-balasubramanian

Post on 16-Oct-2014

891 views

Category:

Documents


28 download

TRANSCRIPT

Page 1: Synon Questions With Answers

General:

From a command line how would you go about entering a Synon/M model?

YSTRY2

What are the types of Synon/2E user (Class)?*DSNR, *PGMR, *USER

How do you restrict *DSNR access to a model?Restrict Management authority to data area YMDLLIBRFAY MODEL LIBRARY RESTRICT FURTHER ACCESS

Before changing parameters on an existing function, what should be checked and how do you check it?All referencing functions must be modified to accept the new or

changed parameters. Place a "U” (Usages) against the function; this will display

function references.

How do you retrieve all the object references to a function?Place an ‘R’ (References) in front of the function to get all the object references to this function.

What is the difference between function options Reclaim Resources and Closedown Program, and how should they be implemented?Closedown program sets on the LR indicator in the generated RPG

source, and reclaim resource (RCLRSC) will close down any programs still openthat are below the current program in the invocation stack.

Data Model – Files, Fields and access path:

What does it mean if a file is Owned by another file?Let’s say department is owned by Company. This means Primary key

of Company file becomes primary key of the Department file. There are

TWO primary keys in department now 1) Company code 2) Department

code.

document.doc 1 Additional Questioons Section

Page 2: Synon Questions With Answers

Synon/2E Test – Additional Questions

What does it mean if a file Refers to another file?To include a non-key field from the referenced file in the referencing

file, youneed to specify it as a virtual field. This makes the field available for

use in thefunctions that operate upon the referencing file.

Let’s say Employee file refers to Department file. This means apart from

Employee number as the primary key, employee file will have Company code as

well as Department code as the Foreign key in it.

To include the non-keyed field in the Employee file, make the non-keyed field as

a virtual field. For example if you want to include Department Name in the

Employee file make Department Name as a virtual field.

What is a Virtual field, how does Synon implement them and would you use them?When a file is referenced by another file by means of a Refers to

relation,entries are automatically created on the referencing file for the key

fields ofthe referenced file. These are known as foreign keys and are shown in

bold inthe figure below.

To include a non-key field from the referenced file in the referencing file, you

need to specify it as a virtual field. This makes the field available for use in the

functions that operate upon the referencing file.

What is a Qualified by relation and what would you use it for?Qualified by relates to the key itself or you can say it acts as a filter on an access path such as *GE or *LE.It specifies a key field on the file that changes the way the record is accessed. Instead of a direct read to the record, it can be used to find a record *GE or *LE the specified key. For example, Effective Date in a Pricing file.

document.doc 2 Additional Questions Section

Page 3: Synon Questions With Answers

Synon/2E Test – Additional Questions

Can a file Refer to itself?Answer: YES - Employee Refers to Employee for Manager

(involution).

Can a file Own itself?Answer: NO

What are the basic differences between Reference (REF) and Capture (CPT) files? These are File Types. REF is more or less static in nature. CPT is

transactionrelated

Functions:

Default functions created based on file typesREF file: 3 internal as well as two external functions are created by defaultCRTOBJCHGOBJDLTOBJEDTFILSELRCD

CPT file: For CPT file only three internal functions are created by defaultCRTOBJCHGOBJDLTOBJ

What are the internal database functionsWhether it is REF or CPT, following is created by SYNON as default functionsCRTOBJ, DLTOBJ, CHGOBJ and RTVOBJFirst 3 uses the UPD access path

Suffix and prefixPrefix is linked to whether it is Inquiry or maintenanceSuffix is linked to the presentation style

Suffix:

RCD - Single record presentation style

document.doc 3 Additional Questions Section

Page 4: Synon Questions With Answers

Synon/2E Test – Additional Questions

FIL - Multiple record (subfile) presentation styleTRN - Single header record + subfile presentation style

External functionsSingle Record: EDTRCD, DSPRCDMultiple Records: EDTFIL, DSPFIL/SELRCDTRN: EDTTRN, DSPTRN

What are the steps required to create a function and in what order? Function name Function Type Access Path Parameters Options Screen Design Action Diagram Generate and Test

Miscellaneous SYNON:

What are the four basic constructs used within an action diagram?Answer: Sequence blocks, CASE, Iterative, statements

Note: Within construct 1) Conditions 2) Actions

What are the important line commandsICF for CASE, IAF for action, IIF for Iteration – IC, ICF, IA, IAF, II, IIF

What are the conditions *PGMERR and *RCDERR used for?Answer: *PGMERR traps errors for the whole program, and *RCDERR

traps errors for the current record only.

What does *QUIT do, and what are the common misconceptions about it?Answer: Quit takes the control to the end of the sequence block/

iteration loop/subroutine/ or a case block whichever is the nearest or closest.

What are the potential problems of using the WRK context for fields?Answer: WRK fieIds are global for a program, and retain the same

value for internal functions called by that program. If passed as parameters, Synon/2E keeps the context the same, i.e., WRK field used instead of PAR field.

document.doc 4 Additional Questions Section

Page 5: Synon Questions With Answers

Synon/2E Test – Additional Questions

What is an alternative to using WRK context?Answer: LCL

Parameter usage Input Only – Passed to the called program based on which called

program does some linking or calculations. Parameter when returned to the calling program is not changed.

Output only – A blank can be passed but called program can do some linking or calculation and returns it back to the calling program

Both – An input is passed and output is returned Neither

Note: Define parameters using IAF

What is the difference between RST and POS(parameter roles) on key parameters?Answer: RST: Let’s say a file has key fields in sequence as

Company code, Department code and Employee code. Restrictor parameter will return a single record if full RST is used. If RST is only used on Department code and company code then all the records for the same department code and company code will be returned. If RST is used only on company code then all the records for that company code will be returned.POS: This will return all the records from that position onwards

Plow does setting the role of a parameter to VARY affect the parameter? Answer: It desensitizes the data type and domain checking.

How do you eliminate reverse imaging for screen fields that are passed into a called function from which a non-blank, non-error return code is expected?Answer: When defining the parameters for the message or the called

function, set the “Flag Error” field to “No.”

How do you control which SELRCD a function will call with the F4 prompt? In the screen design relations use option ‘S’ to change the SELRCD

called by this function, or on the retrieval index access path relations use ‘S’ to

change the default SELRCD for this file.

document.doc 5 Additional Questions Section

Page 6: Synon Questions With Answers

Synon/2E Test – Additional Questions

How can a function field be deleted from a device design?Answer: Press F20 from the device design screen and then F11 to

Delete.

A new condition has been added to a field. When testing the regenerated function, the new condition is not listed when the field is prompted (using ? or F4). What two things might be wrong?The YCVTCNVDVAL command needs to be run, or the screen has a

condition list on which the new condition is not selected

What is an Execution Message, and what are the advantages and disadvantages of using an execution message?An execution message will execute CL program, to call a program or

command. The advantage is that you don't have to write a CL program to do this.

The disadvantages are that if the command fails Synon deletes the escape

messages before they can be seen, which makes debugging a problem. Also, if a

Synon function is called from the execute message, the impact analysis willnot show this relationship. To solve this problem, include the

commented out function whenever the execute message is used

How do you include a PRTOBJ within a PRTFIL?Answer: Enter a ‘T’ against the PRTFIL and select the required

PRTOBJ.

How do you implement batch processing in Synon/2E?Answer: Use an EXCEXTFUN with a RTVOBJ inside.

How would you fund out why you YGENSRC failed?Answer: Use a search on ‘E* Y2’ in the source member; if there is no

source then check the YGENSRC job log.

What are the differences between an EDTTRN and an EDTFIL? Answer:

What are the differences between a EDTRCD and a PMTRCD? Answer:

document.doc 6 Additional Questions Section

Page 7: Synon Questions With Answers

Synon/2E Test – Additional Questions

What is a ‘level check’ on a file, and how would you correct a level check? Answer:Synon/2E Test-Additional questions

What is an Extended By relation and when would you use it? Defines a one for one relationship. Used as an extension file to avoid recompilation of existing objects; used where a subset of fields are

only required by a small number of records; or used to denote a relationship

between two files in the model.

What command is used to assimilate a physical file into a model Answer: YRTVPFMDL

Does Synon generate code to support referential integrity? Also, what about for the deletion of records?Yes, it supports referential integrity, but does not support the deletion

of records.

How do you clear an array? Answer: DLTOBJ with no parameters

How do you copy the contents of an action diagram into the notepad, clearing it first. Answer: NR / NRR

How would you code for a record delete option in a display file function? Change function option for Post Confirm Pass to Y. Code for delete in

theProcess sub file (post confirm)

How would you code for allocating a sequential Invoice Number if a "Next Invoice Number" field is held on an application control file? Answer: Use a CHGOBJ function to lock the control record

What is the difference between a Completion message, a Status message and an Information message?

document.doc 7 Additional Questions Section