SYNON 2E (COOL 2E)

205 pts.
Tags:
AS/400
Synon/2E
Synon/Cool 2E
Can anybody explain me about the Sharing concept in Synon...

Answer Wiki

Thanks. We'll let you know when a new response is added.

First, I have to assume that you already know the basics of 2E Entity modeling relations (Owned, Keyed, Has, Includes, Refers) and how they are used in the building of a file.

Sharing is an extension of the ‘Refers’ relation, but only comes into play when you want to ‘Refer’ to the same file more then once and the referenced file has more then one key.

The standard use of the ‘Refer’ relation adds the full key structure of the file you’re referring to into your new file as a foreign key. If you add a second reference to same file, the same key structure is duplicated into your file entity. Then depending on your model YSHRDFT value (*NONE/*ALL) – the sharing action is defaulted or not.

Adding the sharing specification does two things:

1. It adds reference clarity to the model and the physical file fields, by using the ‘FOR TEXT’ – what is this reference for.
2. Define ‘HIGH ORDER’ foreign key usage – either creating separate or shared high order keys in the file.

The sharing information is added by expanding the REFERS TO line with a <b>+</b>

This adds an ‘FOR TEXT’ and ‘SHARING’ area to the REFERS TO line.

The FOR TEXT documents what the refers is for. This will add comments to the physical file and COLHDG values for the subsequent references.

The SHARING regulates the construction and usage of the HIGH ORDER key(s)

*NONE – No sharing of high order key(s) – a separate entry is added to the file for all the fields.
*ALL – High order key(s) is shared – the low order key will always have a separate entry.

Here is an example:

Company Known by 10 FLD Company Key

Customer Owned by 10 FIL Company This is the HIGH ORDER key
Customer Known by 20 FLD Customer key

Customer is owned by Company – This gives the customer master file at least two keys (Company, Customer)

Usage of Customer with *NONE

Order Known by 10 FLD Order Number
Order Refers to 20 FIL Customer
For: Ordering Customer Sharing: *NONE
Order Refers to 30 FIL Customer
For: Invoicing Customer Sharing: *NONE

The generated order file would look like this:

ORDER KEY
COMPANY KEY Ordering Customer
CUSTOMER KEY
COMPANY KEY Invoicing Customer
CUSTOMER KEY

Using *ALL

Order Known by 10 FLD Order Number
Order Refers to 20 FIL Customer
For: Ordering Customer Sharing: *ALL
Order Refers to 30 FIL Customer
For: Invoicing Customer Sharing: *ALL

The generated order file would look like this:

ORDER KEY
COMPANY KEY A shared Company key.
CUSTOMER KEY Ordering Customer
CUSTOMER KEY Invoicing Customer

///

I didn’t understand this completly. I wanted to know what happens if I add Sharing upon a file. What will happen to key fields. What Sharing actually means??? Also, what is the difference between Sharing *all and *none. Please expalin in that way….

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Yorkshireman
    Are you asking about file sharing within DB2 UDB , or the Sharing concept within a 2e model as explained above. For file sharing, refer to the IBM DB2 manuals and redbooks. www.ibm.com wil get you there with a bit of searching.
    5,580 pointsBadges:
    report
  • MAGIC
    I am asking about the Sharing concept within a 2e model
    205 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following