Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > Code & Utilities

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 3rd December 2001, 20:23
~Vamsi's Avatar
~Vamsi ~Vamsi is offline
Guru
 
Join Date: Aug 2001
Location: San Diego CA, USA
Posts: 590
~Vamsi will become famous soon enough
Baan: ~*~ - DB: ~*~ - OS: ~*~
CODE: Table Loader

Norbert Wimmer sent this one in. Thanks Norbert.

Code:
<font color="#0000ff">|******************************************************************************</font>
<font color="#0000ff">|* tdzus9400msql  0  VRC B40C c4 RUG</font>
<font color="#0000ff">|* Title	: Table Loader - Source and Data Generator</font>
<font color="#0000ff">|*		: Erzeuge Prog. fuer SQL-Export</font>
<font color="#0000ff">|* Author	: Norbert Wimmer</font>
<font color="#0000ff">|* Date		: 2001-09-19</font>
<font color="#0000ff">|******************************************************************************</font>
<font color="#0000ff">|* Main table tdzus900 Historie Schnittstelle Export, Form Type 4</font>
<font color="#0000ff">|******************************************************************************</font>
<font color="#0000ff">|* Script Type	: Type 4 Without Main Table</font>
<font color="#0000ff">|* Description	: <library description></font>
<font color="#0000ff">|* Category	: Utility</font>
<font color="#0000ff">|* License	:</font>
<font color="#0000ff">|* Copyright 2001 by Norbert Wimmer</font>
<font color="#0000ff">|*</font>
<font color="#0000ff">|* All Rights Reserved</font>
<font color="#0000ff">|*</font>
<font color="#0000ff">|* Permission to use, copy, modify, and distribute this software and its</font>
<font color="#0000ff">|* documentation for any purpose and without fee is hereby granted,</font>
<font color="#0000ff">|* provided that the above copyright notice appear in all copies and that</font>
<font color="#0000ff">|* both that copyright notice and this permission notice appear in</font>
<font color="#0000ff">|* supporting documentation.</font>
<font color="#0000ff">|*</font>
<font color="#0000ff">|* Norbert Wimmer and Baanboard.com DISCLAIM ALL WARRANTIES WITH REGARD TO THIS</font>
<font color="#0000ff">|* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY</font>
<font color="#0000ff">|* AND FITNESS, IN NO EVENT SHALL Norbert Wimmer nor Baanboard.com BE LIABLE FOR ANY</font>
<font color="#0000ff">|* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES</font>
<font color="#0000ff">|* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,</font>
<font color="#0000ff">|* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER</font>
<font color="#0000ff">|* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE</font>
<font color="#0000ff">|* OR PERFORMANCE OF THIS SOFTWARE.</font>
<font color="#0000ff">|******************************************************************************</font>
<font color="#0000ff">|* What it does:</font>
<font color="#0000ff">|* you enter a table and its PC. A script is produced, which, when compiled and</font>
<font color="#0000ff">|* run, produces two files: xxxx.sql contains the SQL statements needed to</font>
<font color="#0000ff">|* create this table in a database, xxxx.dat contains the data of this table,</font>
<font color="#0000ff">|* ready to be loaded into the new database table.</font>
<font color="#0000ff">|* </font>
<font color="#0000ff">|* The form is missing, but simple.</font>
<font color="#0000ff">|* 7 input fields: 3 for table package/module/name. 3 for  package combination</font>
<font color="#0000ff">|* like B40C c4 namx and a string containing the directory for the output file.</font>
<font color="#0000ff">|* This program creates an ascii file which can be loaded as a source and then</font>
<font color="#0000ff">|* be compiled.</font>
<font color="#0000ff">|* The only fault it has is that it assumes that the PVRC is derived from</font>
<font color="#0000ff">|* B40Uc4stnd, which itself is derived from B40c4. This may have to be changed</font>
<font color="#0000ff">|* in the source.</font>
<font color="#0000ff">|******************************************************************************</font>
<font color="#0000ff">|****************************** declaration section ***************************</font>
<b><font color="#804040">declaration:</font></b>

	<b><font color="#804040">table</font></b>	tttadv400       <font color="#0000ff">| domains</font>
	<b><font color="#804040">table</font></b>	tttadv401       <font color="#0000ff">| enums + constraints</font>
	<b><font color="#804040">table</font></b>	tttadv402       <font color="#0000ff">| enum Description</font>
	<b><font color="#804040">table</font></b>	tttadv420       <font color="#0000ff">| table definitions</font>
	<b><font color="#804040">table</font></b>	tttadv421       <font color="#0000ff">| table indices</font>
	<b><font color="#804040">table</font></b>	tttadv422       <font color="#0000ff">| table fields</font>
	<b><font color="#804040">table</font></b>	tttadv423       <font color="#0000ff">| child fields</font>


	<b><font color="#804040">extern</font></b>	<b><font color="#804040">domain</font></b>	tcmcs.str2      t1
	<b><font color="#804040">extern</font></b>	<b><font color="#804040">domain</font></b>	tcmcs.str3      t2
	<b><font color="#804040">extern</font></b>	<b><font color="#804040">domain</font></b>	tcmcs.str3      t3
	<b><font color="#804040">extern</font></b>	<b><font color="#804040">domain</font></b>	tcmcs.str4      t4
	<b><font color="#804040">extern</font></b>	<b><font color="#804040">domain</font></b>	tcmcs.str2      t5
	<b><font color="#804040">extern</font></b>	<b><font color="#804040">domain</font></b>	tcmcs.str4      t6
	<b><font color="#804040">extern</font></b>	<b><font color="#804040">domain</font></b>	tcmcs.str70     dirnam
	      	<b><font color="#804040">domain</font></b>	tcmcs.str2      cpac
	      	<b><font color="#804040">domain</font></b>	tcmcs.str12     cdom
	      	<b><font color="#804040">domain</font></b>	tcmcs.str4      vers
         	<b><font color="#804040">domain</font></b>	tcmcs.str2      rele
	      	<b><font color="#804040">domain</font></b>	tcmcs.str4      cust
                        <b><font color="#804040">string</font></b>          buff<b><font color="#804040">(</font></b><font color="#ff00ff">300</font><b><font color="#804040">)</font></b>
                        <b><font color="#804040">string</font></b>          tabnam<b><font color="#804040">(</font></b><font color="#ff00ff">8</font><b><font color="#804040">)</font></b>
.....................


Please see the attached file for the full code
Attached Files
File Type: bc tableloader.bc (23.2 KB, 366 views)
Reply With Quote
  #2  
Old 13th March 2002, 21:42
csekhar's Avatar
csekhar csekhar is offline
Junior Member
 
Join Date: Nov 2001
Location: USA
Posts: 24
csekhar is on a distinguished road
Baan: Baan IVc4 - DB: Informix 7.31Ud5 - OS: IBM AIX 5.2
Usage of this script

Vamsi,
What is the usage of this script ?? I downloaded the script and from the documentation also it is not clear what this script does. The reason I'm asking is we are planning to move to IVc4. We are right now on Baan IVc. We modified some of the table definitions like making some fields mandatory / adding additional fields etc. Please let me know the usage of this script. Where can I use this script ??
Regards
Chandu
Reply With Quote
  #3  
Old 14th March 2002, 02:32
~Vamsi's Avatar
~Vamsi ~Vamsi is offline
Guru
 
Join Date: Aug 2001
Location: San Diego CA, USA
Posts: 590
~Vamsi will become famous soon enough
Baan: ~*~ - DB: ~*~ - OS: ~*~
This was one of the first scripts that got uploaded to this forum. Norbert is the Author. I have not used it and am unable to explain the full use of it. May be Norbert will notice the thread and reply.
__________________
~Vamsi
Vamsi Potluru
Baan XL Yet another tool to format Baan output in Excel from Baan Board
This one just happens to be free :)

Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
Sponsored Links
  #4  
Old 26th February 2003, 13:05
norwim's Avatar
norwim norwim is offline
Guru
 
Join Date: Oct 2001
Location: Germany Moenchengladbach
Posts: 450
norwim is on a distinguished road
Baan: some - DB: more - OS: many
sorry for this VERY late reply.
The idea of this script is the following:
you need to create a seq. dump of table but can't use bdbpre.
So what this script does is:
read in the PVRC and a table name (from a form to be created)
plus a directory-name.

Now the program reads the information about the table from the tools tables (indices, fields, domains etc.) and creates a seq. file:

This (newly created) file is a template ready to be translated with Baan compiler and contains two functions:
1) first function to create a file containing the field descriptions (to be used later to create that table under mysql)
2) second function to write one record of that table

The program created has a select statement that reads the table and calls the second function for each record.

Note that the directoryname passed will be used for the output commands in both functions.

We use this script here from time to time to append an existing program script that dumps a load of tables each night.

hth

Norbert
__________________
Have a nice day
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Product Configurator Constraints w/ 4gl fosterjr Manufacturing & Supply Chain 11 29th January 2015 14:03
copy records c_siek Tools Development 9 18th June 2004 15:43
Cannot Update Currency in Customer Master using API musman AFS/DDC/OLE: Function servers 8 21st August 2002 17:31
Error Code 103 on Table? Haggis Tools Administration & Installation 5 28th February 2002 17:13


All times are GMT +2. The time now is 21:09.


©2001-2017 - Baanboard.com - Baanforums.com