hankfu
22nd December 2002, 04:57
Hi,

I created a dump for tuxch001 to tuxch022. Then creat the tables in the other company from the dump. I found the tables have been created, but the scripts of the condition were not included in the dump.

Who can tell me how I can dump the script from the present company?

Thank you in advance.

Darren Phillips
22nd December 2002, 13:29
The scripts are in the text tables. you could write an exchange scheme and use conditional scripts to only export the text that are referenced in the tuxch tables.

If it is new company without live data in it you could just also dump and import the text tables and then run delete unused texts which will leave you with just the texts you need.

hankfu
23rd December 2002, 10:28
But which text tables do I have to export?

And if I create a dump and choose "Append" to import, can it work?

Regards
hank

Darren Phillips
23rd December 2002, 11:38
you can do a dump of all the text tables and then import but depends on you situation. If the company you want to import to currently has no data then this is fine. But if there are is already data so that text numbers have already been used then this is not a good ideas. I believe it is possible to use exchange to export text with either the option of using the same text number or generate new text numbers.

have you tried using copy exchange code structure session tuxch0201m000. I have not tried it but it may copy the conditions for you as well.

Francesco
23rd December 2002, 19:57
I use three different techniques to copy exchange scripts.

if possible, the first one is the easiest, using session tuxch0201m000 (copy exchange schemes). As long as the companies are in the same VRC (and on the same server), this is obviously the preferred method.

If the companies are on the same server but in different VRC's, I use a copy company. This is a bogus company with only the tu and tttxt tables in it. Move it to the VRC where your scripts are in, copy the scripts to the copy company. Then move the copy company to the target VRC and copy the scripts from the copy company to their final destination.

Finally, for companies on different servers, I use exchange. Simply export all tu tables, copy the export to the target server and perform an import there. To make sure you copy texts along with your scripts, make sure to select multi-line text in the field type in your ASCII file definition. This way there is no need to copy text data separately and there is no risk of overwriting existing texts.

The script I use to export schemes actually allows me to single out scripts, by using the following condition:

TABLE ttuxch001
EXTERN STRING strScheme(8)
STRING strMessage(40)
LONG lngSubwindow
LONG lngCurWindow

IF STRIP$(strScheme) = "" THEN
cl.screen(1,1,80,16)
refresh()
cp$(1,1)
insertln$("Type the name of the scheme to be exported and hit enter.")
data.input("", strScheme, "")
SELECT tuxch001.cxch
FROM tuxch001
WHERE tuxch001.cxch = :strScheme
SELECTEMPTY
strMessage = "Exchange scheme " & strScheme & " does not exist."
message(strMessage)
abort()
ENDSELECT
ENDIF
cp$(1,1)
refresh()

IF STRIP$(cxch)=strScheme THEN
RETURN(True)
ELSE
RETURN(False)
ENDIF


The dialog part looks ugly as hell, but it does the trick.

hankfu
26th December 2002, 05:12
Hi,Francesco

According to your suggestion, I have accomplished the goal.

Thank you!