# Customising RE scripts

**URL:** <https://forums.toadworld.com/t/customising-re-scripts/1611>\
**Category:** Toad Data Modeler\
**Created:** [March 13, 2008, 12:34pm UTC](https://forums.toadworld.com/t/customising-re-scripts/1611 "2008-03-13T12:34:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![moakes](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@moakes](https://forums.toadworld.com/u/moakes)\
**Post date:** [March 13, 2008, 12:34pm UTC](https://forums.toadworld.com/t/customising-re-scripts/1611/1 "2008-03-13T12:34:24Z")

</div>

Hi,

In order to overcome some of the issues I’ve mentioned elsewhere I want to customise some parts of the RE script. I’m using TDM 3.1.5.6 with Oracle 9i (and soon 10g).

I’ve tried following the Help Manual pages (I managed to customise a report following them).  
How do I find the information on which package to extend, what data types the parameters are, etc.  
Can I replace any functions? For example as a starter I want to alter LoadViews in PERDataMigratorDBOR to remove the quotes round the column aliases.  
I’ve so far been unable to get my version of LoadViews to be run.

Can you give me some pointers please.

Thanks  
Malcolm

---

<div class="post-metadata">

**Author:** ![vladka](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/vladka/32/41_2.png) [@vladka](https://forums.toadworld.com/u/vladka)\
**Post date:** [March 14, 2008, 8:19am UTC](https://forums.toadworld.com/t/customising-re-scripts/1611/2 "2008-03-14T08:19:42Z")

</div>

Hello Malcolm,

Here I’m with a reply.

Brief info on current stage:

Unfortunately, at the moment it is difficult for users to customize the scripts on their own (and it’s not only because of lack of documentation on this issue). The reason is that we need to make it more easier and user friendly. Changes and improvements in this issue are already under way. -\> The main priorities for next version 3.2 are: Optimization of the application code, scripting method, speed and memory consumption.  
As soon as final code and scripting method are known, we will start  
to document it. In our Modeling community, Blog is planned. We will continuously  
publish some tips on scripting, how-tos etc. there (even before the next official release 3.2).

Generally, there are two ways of customization now:

1. Extend system packages.
2. Edit system packages and scripts.

AD1]  
This is a method that our team prefers.  
Advantage - user changes will be preserved during the application update, system packages and scripts will be updated.  
Unfortunately, as written above, changes and improvements are planned. For now, appropriate documentation is not available.

AD2]  
This is a quite easy way (will be described below).  
Disadvantage - With an application update, the modified system package will be always overwritten.

Malcolm, if you like to try to modify a system package to get the required result, please take the following steps:

1. Find a location where you store system packages. Default location:  
C:\Program Files\Quest Software\Toad Data Modeler 3\Packages\System
2. Find the package OREDBOR.txg.
3. In the package properties, disable the Read Only property.
4. Launch TDM3 and open Script Explorer (Tools menu).
5. In the Script Explorer, find the DataMigratorDBOR script and double-click it to open it in Script Editor.
6. Find function LoadViews.
7. In the LoadViews function, find the following line:  
Aliases += ‘"’+SubQuery.GetFieldValue( ‘COLUMN\_NAME’ )+’"’;
8. Make the modifications you need, remove quotes you don’t want.
9. Press Commit to save the changes in the script.
10. Now you can do the RE to see the changes.
11. If you like to save the changed script in the package, open the Package Explorer, select the package and save it. (Or simply close TDM3, the package will be saved automatically.)

If you plan to make more modifications, we recommend to save the changes continuously (in the script and package too).

Malcolm, if you have any questions, please write us back. Thanks.

Vladka + Mario

---

<div class="post-metadata">

**Author:** ![moakes](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@moakes](https://forums.toadworld.com/u/moakes)\
**Post date:** [March 17, 2008, 3:28am UTC](https://forums.toadworld.com/t/customising-re-scripts/1611/3 "2008-03-17T03:28:08Z")

</div>

Hello Vladka + Mario,

Thanks for the reply.

I was hoping to be able to use method 1 to extend the system packges rather than edit them directly.

I had made some changes to the previous version’s system packages but I wanted to do it “properly” this time in the hope I wouldn’t have to keep repeating the customisation with each new TDM release.

Kind regards  
Malcolm

---

<div class="post-metadata">

**Author:** ![vladka](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/vladka/32/41_2.png) [@vladka](https://forums.toadworld.com/u/vladka)\
**Post date:** [March 17, 2008, 4:01am UTC](https://forums.toadworld.com/t/customising-re-scripts/1611/4 "2008-03-17T04:01:28Z")

</div>

Hi Malcolm,

> I had made some changes to the previous version's system packages but I wanted to do it "properly" this time in the hope I wouldn't have to keep repeating the customisation with each new TDM release.

Yes, we understand. Unfortunately, TDM3 is not fully ready for this yet. Our developers are working at it. I'm afraid, we need to ask you for patience. Thanks very much.

Regards,

Vladka + TDM Team

---

<div class="post-metadata">

**Author:** ![moakes](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@moakes](https://forums.toadworld.com/u/moakes)\
**Post date:** [March 18, 2008, 3:46am UTC](https://forums.toadworld.com/t/customising-re-scripts/1611/5 "2008-03-18T03:46:06Z")

</div>

Hi,

I’ve decided to take the route of creating scripts to make the changes I require after the model has been REd.

This leads to another question…  
…is it possible to make a connection to a specified database from a script?  
I was looking up some data from one of our tables. This will require connection to an Oracle 9 or 10 database with a known connection string, then selecting data from a table.

Thanks  
Malcolm

---

<div class="post-metadata">

**Author:** ![vladka](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/vladka/32/41_2.png) [@vladka](https://forums.toadworld.com/u/vladka)\
**Post date:** [March 18, 2008, 7:57am UTC](https://forums.toadworld.com/t/customising-re-scripts/1611/6 "2008-03-18T07:57:16Z")

</div>

Hi Malcolm,

> ...is it possible to make a connection to a specified database from a script?

Unfortunately, it is not possible.

Extending packages issue  
Malcolm, I'd like to ask you for patience. We've discussed it with our developers. We will try to make a 'how to' movie tomorrow for you.

Thanks.

Regards,

Vladka + TDM Team

---

<div class="post-metadata">

**Author:** ![vladka](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/vladka/32/41_2.png) [@vladka](https://forums.toadworld.com/u/vladka)\
**Post date:** [March 20, 2008, 10:28am UTC](https://forums.toadworld.com/t/customising-re-scripts/1611/7 "2008-03-20T10:28:36Z")

</div>

Hi Malcolm,

Vaclav has made a movie for you. It describes how you can extend system packages and modify system scripts for RE of Oracle 9i database.  
You can watch the movie at:  
[http://modeling.inside.quest.com/entry.jspa?externalID=1731&categoryID=281](http://modeling.inside.quest.com/entry.jspa?externalID=1731&categoryID=281)

Some other documentation on this issue will be published soon. - It’s just been attached to the movie. Thanks.

Regards,

Vladka + Vaclav

Message was edited by: vladka - added info on the published doc.

---

<div class="post-metadata">

**Author:** ![moakes](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@moakes](https://forums.toadworld.com/u/moakes)\
**Post date:** [March 25, 2008, 8:45am UTC](https://forums.toadworld.com/t/customising-re-scripts/1611/8 "2008-03-25T08:45:49Z")

</div>

Hi,  
Thanks very much for the very helpful video and document.  
I managed to make all the “hacks” that I wanted.  
Thanks again  
Malcolm

---

<div class="post-metadata">

**Author:** ![vladka](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/vladka/32/41_2.png) [@vladka](https://forums.toadworld.com/u/vladka)\
**Post date:** [March 25, 2008, 9:02am UTC](https://forums.toadworld.com/t/customising-re-scripts/1611/9 "2008-03-25T09:02:34Z")

</div>

Hello Malcolm,

Thanks for this great news! Very happy to hear that you managed to make it!  
Thumbs-up! 🙂

TDM Team
