~Vamsi
3rd December 2001, 21:23
Norbert Wimmer sent this one in. Thanks Norbert.
|******************************************************************************
|* tdzus9400msql 0 VRC B40C c4 RUG
|* Title : Table Loader - Source and Data Generator
|* : Erzeuge Prog. fuer SQL-Export
|* Author : Norbert Wimmer
|* Date : 2001-09-19
|******************************************************************************
|* Main table tdzus900 Historie Schnittstelle Export, Form Type 4
|******************************************************************************
|* Script Type : Type 4 Without Main Table
|* Description : <library description>
|* Category : Utility
|* License :
|* Copyright 2001 by Norbert Wimmer
|*
|* All Rights Reserved
|*
|* Permission to use, copy, modify, and distribute this software and its
|* documentation for any purpose and without fee is hereby granted,
|* provided that the above copyright notice appear in all copies and that
|* both that copyright notice and this permission notice appear in
|* supporting documentation.
|*
|* Norbert Wimmer and Baanboard.com DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
|* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|* AND FITNESS, IN NO EVENT SHALL Norbert Wimmer nor Baanboard.com BE LIABLE FOR ANY
|* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
|* OR PERFORMANCE OF THIS SOFTWARE.
|******************************************************************************
|* What it does:
|* you enter a table and its PC. A script is produced, which, when compiled and
|* run, produces two files: xxxx.sql contains the SQL statements needed to
|* create this table in a database, xxxx.dat contains the data of this table,
|* ready to be loaded into the new database table.
|*
|* The form is missing, but simple.
|* 7 input fields: 3 for table package/module/name. 3 for package combination
|* like B40C c4 namx and a string containing the directory for the output file.
|* This program creates an ascii file which can be loaded as a source and then
|* be compiled.
|* The only fault it has is that it assumes that the PVRC is derived from
|* B40Uc4stnd, which itself is derived from B40c4. This may have to be changed
|* in the source.
|******************************************************************************
|****************************** declaration section ***************************
declaration:
table tttadv400 | domains
table tttadv401 | enums + constraints
table tttadv402 | enum Description
table tttadv420 | table definitions
table tttadv421 | table indices
table tttadv422 | table fields
table tttadv423 | child fields
extern domain tcmcs.str2 t1
extern domain tcmcs.str3 t2
extern domain tcmcs.str3 t3
extern domain tcmcs.str4 t4
extern domain tcmcs.str2 t5
extern domain tcmcs.str4 t6
extern domain tcmcs.str70 dirnam
domain tcmcs.str2 cpac
domain tcmcs.str12 cdom
domain tcmcs.str4 vers
domain tcmcs.str2 rele
domain tcmcs.str4 cust
string buff(300)
string tabnam(8)
.....................
Please see the attached file for the full code
|******************************************************************************
|* tdzus9400msql 0 VRC B40C c4 RUG
|* Title : Table Loader - Source and Data Generator
|* : Erzeuge Prog. fuer SQL-Export
|* Author : Norbert Wimmer
|* Date : 2001-09-19
|******************************************************************************
|* Main table tdzus900 Historie Schnittstelle Export, Form Type 4
|******************************************************************************
|* Script Type : Type 4 Without Main Table
|* Description : <library description>
|* Category : Utility
|* License :
|* Copyright 2001 by Norbert Wimmer
|*
|* All Rights Reserved
|*
|* Permission to use, copy, modify, and distribute this software and its
|* documentation for any purpose and without fee is hereby granted,
|* provided that the above copyright notice appear in all copies and that
|* both that copyright notice and this permission notice appear in
|* supporting documentation.
|*
|* Norbert Wimmer and Baanboard.com DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
|* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|* AND FITNESS, IN NO EVENT SHALL Norbert Wimmer nor Baanboard.com BE LIABLE FOR ANY
|* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
|* OR PERFORMANCE OF THIS SOFTWARE.
|******************************************************************************
|* What it does:
|* you enter a table and its PC. A script is produced, which, when compiled and
|* run, produces two files: xxxx.sql contains the SQL statements needed to
|* create this table in a database, xxxx.dat contains the data of this table,
|* ready to be loaded into the new database table.
|*
|* The form is missing, but simple.
|* 7 input fields: 3 for table package/module/name. 3 for package combination
|* like B40C c4 namx and a string containing the directory for the output file.
|* This program creates an ascii file which can be loaded as a source and then
|* be compiled.
|* The only fault it has is that it assumes that the PVRC is derived from
|* B40Uc4stnd, which itself is derived from B40c4. This may have to be changed
|* in the source.
|******************************************************************************
|****************************** declaration section ***************************
declaration:
table tttadv400 | domains
table tttadv401 | enums + constraints
table tttadv402 | enum Description
table tttadv420 | table definitions
table tttadv421 | table indices
table tttadv422 | table fields
table tttadv423 | child fields
extern domain tcmcs.str2 t1
extern domain tcmcs.str3 t2
extern domain tcmcs.str3 t3
extern domain tcmcs.str4 t4
extern domain tcmcs.str2 t5
extern domain tcmcs.str4 t6
extern domain tcmcs.str70 dirnam
domain tcmcs.str2 cpac
domain tcmcs.str12 cdom
domain tcmcs.str4 vers
domain tcmcs.str2 rele
domain tcmcs.str4 cust
string buff(300)
string tabnam(8)
.....................
Please see the attached file for the full code