Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Administration & Installation

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 8th November 2001, 22:09
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,028
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
Import Data from File

Hi,

How can we import data from an ascii file with "|" as a delimiter using the bdbpost6.2 ?

Are there any other ways we can import data from flat files to the database?

thanks!
Reply With Quote
  #2  
Old 9th November 2001, 14:59
Jason's Avatar
Jason Jason is offline
Member
 
Join Date: Aug 2001
Location: Brussels, Belgium
Posts: 43
Jason is on a distinguished road
Baan: Triton, BaanIV, BaanERP - DB: Oracle - OS: HP-UX
other ways....

if you want to enter data as if it were going into a session:
i) reflection scripts (not BaanERP though - a bit messy as well)
ii) function server (DDC)

for putting data straight into tables 2 other ways are:
i) Exchange
ii) SQL Loader
Reply With Quote
  #3  
Old 9th November 2001, 17:52
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,028
NPRao will become famous soon enough
Baan: iBaanERP-5.2a(Reger),SSA-ERP-LN-6.1,Infor LN-10.x - DB: Oracle-10g,11g,12c,MS-SQL - OS: HP-UX, Linux, Windows
Hi,

I want to use something from the unix, like the bdbpost methods.

Any ideas?
Reply With Quote
Sponsored Links
  #4  
Old 9th November 2001, 20:53
patvdv's Avatar
patvdv patvdv is offline
Board Master
 
Join Date: Aug 2001
Location: Belgium
Posts: 2,167
patvdv is on a distinguished road
Baan: n/a - DB: n/a - OS: AIX, HP-UX, Linux
Post bdbpost synopsis

Create a database table from a sequential dump or append data to an existing database table.

SYNOPSIS
bdbpost [–I input file][–O output file][–{qE} output file] [–uUvVARfilxnmkK][–p pack_comb][–e file][–d driver type][–D seq_dir] [–t sep] [–c compnr][–C compnr range][pattern]

DESCRIPTION
The bdbpost tool reads from either the argument you supply or from the standard input and creates a new database table if that table does not exist. If the append option is turned on, it appends data to an existing table. The bdbpost tool also compares current data dictionary information with the information in the dump. If they do not match, the bdbpost tool gives an error. If the current data dictionary is not present, it creates a data dictionary based on the dump. For each table, bdbpost prints information such as the table name, indexes, the
number of records, and any errors.
The bdbpost tool can be run using a sequential dump created by bdbpre or by using sequential dumps from other databases. The different methods are shown in the following examples:
This example shows how to use a sequential dump created by bdbpre.
On system 1:
bdbpre –doracle –Ntimcs016 –C000-003 > timcs_dump
On system 2:
bdbpost < timcs_dump
This example shows the use of sequential dumps (–x or –t option of bdbpre) from other databases. In this case the –D option is mandatory to get the directory name in which .S files are stored.
bdbpost –dinformix –t"|" –D./seqdir
bdbpost –doracle –x –D./seqdir


Options –x, –t, and –D are required when you upload ASCII files from another database to the Bshell format.

–D
Path for sequential files, which have the extension .S or .F.

–t
Separator. If you want to load a sequential dump containing separators (for example, dump from UNIFY has separator |), make sure the file name is the table name with the extension .S.
If you want to load a UNIFY sequential dump into the table ttimcs016000, first move the sequential dump to the ttimcs directory with name ttimcs016000.S.
bdbpost –Dttimcs –t"|" searches for a .S file in ttimcs and if that file is found, the corresponding tables are created or appended.
With the –D option all .S files in that directory are used to create/append the tables, so be sure to remove unwanted .S files before running bdbpost.

–x
If you want to load a sequential dump with a fixed-length record without any separators (.F files, for example dump from dBase-III), make sure the file name is the table name with the extension .F.
Suppose you want to load a dBASEIII sequential dump into the timcs016000 table (Oracle organization). bdbpost –doracle –Ddbase –x searches for an .F file in dbase and if that file is found the corresponding table is created or appended.
In some of these examples the database driver type is retrieved from $BSE/lib/tabledef6.2. If you want to use a specific database driver for a particular conversion, you can use the –d option.
The database driver can be of the following types:
  • Sybase (sybase)
  • Oracle (oracle)
  • Informix Online (informix)
  • DB2 (db2)
  • Microsoft-SQL Server (msql)
Enter the driver name of the database driver between the parentheses.

The following parameters can be used for bdbpost:

–u/U
Print usage information.

–v/V
Print information about the version of bdbpost.

–p
Define package combination
<pattern>
Pattern to specify tables that are filtered out of the dump. Wildcards such as * and ? are allowed.

–c
Company number for the tables to be created.

–C
Range of customer numbers on which to perform the bdbpost operation. This must be the last option specified in the command, other than the <pattern> option.

–d
Database driver type, as follows:
O (Oracle) I (Informix) S (Sybase) D (DB2) M (Microsoft SQL-Server) You can use the -d option to copy data from one instance of a database to another, for example:
-d “oracle(ORACLE_HOME=/usr/oracle, ORACLE_SID=D1)”

–x
Load ASCII file (.F) with fixed-length records.

–D
The directory name for ASCII files to be loaded.

–e
File to store the names of unsuccessfully created tables.

–k
The existing tables are deleted.

–K
The existing tables are deleted after a backup is made (if DBMS supports this).

–l
Display contents of input.

–I <file>
Redirects input from input file <file>.

–O <file>
Redirects output to output file <file>.

–E <file>
Redirects errors to error file <file>.

–q <output file>
Redirect terminal output to output file.

–m
Disable domain constraints.

–i
Ignore domain range error and skip record.

–n
Ignore referential integrity constraints.

–A
Append to an existing table. If duplicate records exist, do not overwrite them from the dump. Print duplicate record summary at the end. Create table if it does not exist.

–R
Append to an existing table or create a new one. If a record already exists, the record in the dump replaces it. A summary is given at the end. Note that only the existence of the primary key is checked. If a primary key exists, the record is replaced. If the primary key does not exists but a secondary key exists, error 100
(duplicate record) occurs.

–t
Specify the used separator. The –t option is used when loading an ASCII file from another database.

–f
Fast mode. Tables are created by first inserting all rows and then creating the indexes (if DBMS supports this). When using the –f option be aware of the following:
  • Interrupting bdbpost results in table inconsistency
  • An index cannot be created in case of a duplicate conflict
  • For large tables, the adding of indexes can take a long time (> 15 minutes)

EXAMPLES
bdbpost –C000-005 ticom* < dump
Creates/appends tables only in the given customer range and where the table name matches the pattern ticom.
bdbpost –R –C000-005 ttadv* < dump
Creates/appends tables only in the given customer range and where table name matches the pattern ttadv. If duplicate records exist, they are replaced by records from the dump.
bdbpre –dsybase –Nttadv099 –C000-999 | bdbpost –doracle
Converting from one database organization to another (From Sybase to Oracle organization).
bdbpost –doracle –Dunify –t"|"
Loading from other databases (UNIFY to Oracle)
bdbpost –Doracle –x –dsybase
(Oracle to Sybase)

Caution: If a remote driver is specified in tabledef6.2, the database table from the remote machine is used but the data dictionary is taken from the current machine, which can cause great difficulties.
When the –m or –n option is used, the data in the database can violate the Baan integrity constraints. Data can violate the Baan domains or it can violate Baan referential integrity.
__________________
Regards,

Patrick Van der Veken - Admin & Founder - (c) 2001-2017 baanboard.com/baanforums.com
Reply With Quote
  #5  
Old 30th August 2005, 01:31
chelo1965 chelo1965 is offline
Newbie
 
Join Date: Oct 2004
Posts: 2
chelo1965 is on a distinguished road
Baan: Baan IV, V - DB: Oracle, SQL Server - OS: Unix, Windows 2000 Server
Use of bdbpost6.2 (Baan V) with tables than have DAL

There is some option for bdbpost6.2 that disable the DAL when a file is loaded in the table tdpur401 ?

I only need to load the file, but without using referential integrity, validation of domains, DAL, etc.

Thanks,

Marcelo Hernández
Reply With Quote
  #6  
Old 30th August 2005, 09:01
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
Hi there,

don't know about DAL really, but the flags -n and -m are used to turn of reference and consistency checks. These are used very often, or else you could hardly import data at all.
Just for the sake of mentioning it ...
you can of course read data from flat files with a baan program using seq.xxxx functions, the function string.scan comes in handy to split up records into fields, if they are separeted by i.e. '|'.

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 On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CODE: Validate Import Exchange Scheme Data gfasbender Code & Utilities 10 17th November 2009 23:19
Importing item data from CSV file Paul P Distribution, Transportation & Warehousing 3 8th September 2007 14:01
ERPJewels Hitesh Shah Third Party Products 10 6th November 2006 05:38


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


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