How to change a Production Dataview in Ideal?

Document ID : KB000044412
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

How to rename a field in Dataview/Table.

Answer:

 Things to remember:

1)      A column/field has an entity name and a SQL name.

2)      A field is part of an element(s) which is part of a table.

3)      A dataview is comprised of one or more elements.

 

Phase I:

Given the Datacom table name and the current field name, we can use DDOL:

               2. ENTMAINT - DATADICTIONARY Entity Maintenance

                              2. UPDATE  - Update entity occurrence information

                                             10. UPDATE NAME - Update/Rename occurrence

                                                            Entity-type = FIELD

                                                            Parent-occurrence = table SLR-PLANT

                                                            Occurrence-name = LST-IVC-DT

                                                            Status = PROD

                                                            New Occurrence-name = PLT-INA-DT

                                                                           PF9 to APPLY

This has renamed the field within the element within the table in Datadictionary.

Since the dataviews in the Datadictionary are related to the same elements, the dataviews in the Datadictionary have also been changed to reflect the new entity occurrence field name.  However, because the element(s) was changed each must be enabled in order to be used in Compile and Run by Ideal.

 

From DDOL:

1.      DBMAINT - DATACOM/DB Structure Maintenance

5. ELEMENT - Element structure maintenance

               5. ENABLE - Enable an element structure

                              Element name = SLR-PLMST

                              Table name = SLR-PLANT

                              STATUS = PROD

                                             PF9 to APPLY

 


 

Phase II:

To find all of the dataviews that pertain to this table with the new field name, we will need to run a DDUTILTY path report.  The control cards may look something like this:

 

-USR myuserid,mypassword                    

-DEF PATH,WHATDVW                        

-DEF TRACE TABLE.ELEMENT,$INTERNAL,SKIP  

-DEF TRACE ELEMENT.DATAVIEW,$INTERNAL    

-END                                     

-RPT START,TABLE,SLR-PLANT(PROD),WHATDVW 

-RPT INDENT                              

-END                                      

/*                                        

 

The report will look like this:

 

-DEF PATH,WHATDVW                                                      

-DEF TRACE TABLE.ELEMENT,$INTERNAL,SKIP                                

-DEF TRACE ELEMENT.DATAVIEW,$INTERNAL                                  

-END                                                                   

Date: 06/28/2016  Time: 13.58.07      ******************************************

                                      *               CA Datacom Datadictionary

Security Level: 1                     *                    Utility Report      

                                      *  COPYRIGHT (C) 1990-2011 CA.   ALL RIGHT

User: myuserid                        ******************************************

                                                                               

-RPT START,TABLE,SLR-PLANT(PROD),WHATDVW                               

-RPT INDENT                                                             

-END                                                                   

Date: 06/28/2016  Time: 13.58.07      ******************************************

                                      *               CA Datacom Datadictionary

Security Level: 1                     *                   Indented Report      

                                      *  COPYRIGHT (C) 1990-2011 CA.   ALL RIGHT

User: myuserid                        ******************************************

ENTITY-TYPE...................   OCCURRENCE.....................................

                                    DESCRIPTION.................................

                                       SQLNAME..................................

                                                                                

TBL                              SLR-PLANT                                     

                                    SALES REPORT PLANT RECORD                  

                                       CLARKE.SLR_PLANT                        

      DVW                        SLSR-PLANT                                    

      DVW                        SLSU-PLANT                                    

      DVW                        SLSR-PLT                                       

                                    PLANT NAME & NBR-READ ONLY                 

      DVW                        SLSU-PLT                                      

                                    PLANT NAME & NBR-UPDATABLE                 

      DVW                        SLSR-PLT-NO-NM                                

                                    SLS - SALES PLANT NO. AND NAME             

      DVW                        SLSR-PLT-NO-NM                                

                                    SLS - SALES PLANT NO. AND NAME             

          *****  END OF JOB - NO ERRORS  *****                                 

 

Phase III:

Modeled dataviews are created within the Datadictionary but also have to be populated into the Ideal catalogue.  However, at this point only the Datadictionary dataviews are aware of the field name change.  Therefore, sign onto IDEA,

               2. DATAVIEW - Display dataview definitions

                              2. CATALOG - Catalog dataview definition

                                             Dataview SLSU-PLT          Version = PROD

 

Note: The first line of the display will reflect a new catalogued date and time, the new field name should be reflected as well.

Phase IV:

In Phase I we only changed the Datacom entity occurrence name of the field.  We now need to change the corresponding SQLNAME of the field if nothing else for consistency.  However, Datadictionary will not allow us to take such a short-cut as modifying the field that is in STATUS PROD, it can only be done in test status.  Close all batch and online URTs for the DBID in question then issue a console

F mymuf,COMM CLOSE dbid   

 

Note: This will mean a temporary outage for the database and any applications referencing it.

 

So, from DDOL,

1.      DBMAINT - DATACOM/DB Structure Maintenance

1.      DATABASE - Database structure maintenance

7. RESTORE - Restore a database structure

               Database = SLR-SALES-RPT

               To = T001

               From = PROD

                              PF9 to APPLY

7. SET MODE -  Reset DATADICTIONARY processing mode

 

2. ENTMAINT - DATADICTIONARY Entity Maintenance

               2. UPDATE - Update entity occurrence information

                              1. UPDATE ATTRIBUTE - Update occurrence attributes

                                             Entity-type = FIELD

                                             Parent occurrence-name = SLR-PLANT

                                             Occurrence-name = PLT-INA-DT

                                             Status = T001

                                                            Tab down to the SQLNAME and overtype the previous value

with PLT_INA_DT

               PF9 to APPLY

7. SET MODE -  Reset DATADICTIONARY processing mode

 

1. DBMAINT - DATACOM/DB Structure Maintenance

1. DATABASE - Database structure maintenance

               6. COPY - Copy a database structure

                              Database = SLR-SALES-RPT

                              From status = T001

                              To status = PROD

                                             PF9 to APPLY

               11. CATALOG - Catalog a database structure (to place new SQLNAME in DDD)

                              Database = SLR-SALES-RPT

                              Status = PROD

 

Finally, open all batch and online URTs for the DBID.