Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

CoolGen Relationship Action

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
Mr.Niceguy

New User


Joined: 16 Jun 2005
Posts: 63

PostPosted: Wed Nov 04, 2009 6:20 pm    Post subject: CoolGen Relationship Action
Reply with quote

Hi All,

Can anybody explain the relationship action in CoolGen

(i) Associate (ii) Disassociate and (iii) Transfer with some examples?

It would be really helpful.

Thanks in advance.
Back to top
View user's profile Send private message

Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Thu Nov 26, 2009 4:03 pm    Post subject:
Reply with quote

ASSOCIATE

Relationship actions appear as clauses in CREATE or UPDATE action statements. Specifically, ASSOCIATE can appear as a clause in either CREATE or UPDATE action statements. ASSOCIATE can also appear as a stand-alone relationship action. ASSOCIATE has no exception conditions, but its stand-alone form may have database exception conditions.

When you CREATE an entity, you must build its identifying relationship memberships using an ASSOCIATE. The entity being associated must be one the action diagram recognizes through a CREATE or READ. ASSOCIATE establishes a pairing along a relationship between two entities. You may ASSOCIATE entities when the relationship is optional, and you must ASSOCIATE them (before the end of the elementary process) when the relationship is mandatory.

ex. emp table and emp_dept table.
wheneve you create a row in emp table, you need to associate it with emp_dept table for some department.
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Thu Nov 26, 2009 4:05 pm    Post subject:
Reply with quote

DISASSOCIATE

Relationship actions appear as clauses in CREATE or UPDATE action statements. DISASSOCIATE can also appear as:

Clauses in UPDATE action statements

Stand-alone relationship action

DISASSOCIATE has no exception conditions, but its stand-alone form may have database exception conditions.

You can DISASSOCIATE entities whose relationships have been designated as optional. The DISASSOCIATE action breaks a specific pairing along a specific relationship.

DISASSOCIATE can appear as a clause in an UPDATE action statement or as a stand-alone relationship action like ASSOCIATE. It operates exactly the same as the relationship clauses in the CREATE and UPDATE, with one exception. In relationship clauses, the subject of the clause is always the subject of the entity action. In a stand-alone relationship action, you must explicitly specify the subject of the action.

An example of a stand-alone DISASSOCIATE relationship action is shown below. In this example, received product will be deleted if its relationship to order_line is mandatory and has a cardinality of one. In addition, any product components dependent on that occurrence of PRODUCT will be deleted.

--DISASSOCIATE received product

| FROM order_line WHICH contains IT

--

In the example below, the relationship between PRODUCT and WAREHOUSE in the data model still exists. The pairing between the two specific entities does not. DISASSOCIATE can appear as a clause in an UPDATE action statement (as shown here).

--UPDATE received product

| SET number_delivered TO input product number_delivered

| DISASSOCIATE FROM warehouse WHICH can hold IT

--
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Thu Nov 26, 2009 4:06 pm    Post subject:
Reply with quote

TRANSFER

Relationship actions appear as clauses in CREATE or UPDATE action statements. TRANSFER can also appear as a stand-alone relationship action. TRANSFER has no exception conditions, but its stand-alone form may have database exception conditions.

You can TRANSFER relationships defined as transferable in the data model. The TRANSFER action transfers the relationship between specific entity occurrences. You are changing the pairing from one entity to another. This action does not affect the relationship between entities in the data model. You must READ or CREATE the entity before you TRANSFER the relationship.

For example, consider a warehouse that holds products. Products can be moved from one warehouse to another. In the example below, PRODUCT has been moved from one PROCESSING WAREHOUSE to NEW WAREHOUSE. The relationship between WAREHOUSE and PRODUCT is represented in the data model as PRODUCT always is held in one WAREHOUSE and WAREHOUSE sometimes holds one or more PRODUCT. The relationship is defined as transferable and is not changed in the data model.

-- TRANSFER received product
| FROM processing warehouse WHICH holds IT
| TO new warehouse WHICH holds IT
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts COOLGEN - TSO TEST FACILITY indianrajput CA Products 4 Wed Nov 02, 2016 9:28 pm
No new posts What's the relationship between DB2 t... dejunzhu DB2 7 Fri Aug 22, 2014 8:28 am
No new posts Coolgen Materials Needed thanujap CA Products 1 Mon Jun 23, 2014 3:20 pm
No new posts Compare two tables and populate Actio... noti DB2 13 Wed Dec 11, 2013 7:55 pm
No new posts Action bar shortcut rameyshkanthan v TSO/ISPF 4 Tue Nov 26, 2013 3:34 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us