Академический Документы
Профессиональный Документы
Культура Документы
A publication of: Baan Development B.V. P.O.Box 143 3770 AC Barneveld The Netherlands Printed in the Netherlands Baan Development B.V. 1999. All rights reserved. The information in this document is subject to change without notice. No part of this document may be reproduced, stored or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Baan Development B.V. Baan Development B.V. assumes no liability for any damages incurred, directly or indirectly, from any errors, omissions or discrepancies between the software and the information contained in this document. Document Information Code: Group: Edition: Date: U7137A US User Documentation A September, 1999
Table of contents
Introduction Exchange compared to Database Management To design a data exchange To activate the data exchange The Exchange modules Master Data Data exchange based on audit How to set up a data exchange The Master Data sessions Exchange schemes (tuxch0501m000) ASCII files (tuxch0102m000) ASCII file fields (tuxch0503m000) Batches (tuxch0104m000) Conditions (tuxch0114m000) Parameters by Condition (tuxch0113m000) Import module Introduction Regular and non-regular data exchange To use the Data Access Layer Start and end date and time During the data exchange How to set up an import process The Import module sessions Table Relations (Import) (tuxch0521m000) Field relations (import) (tuxch0522m000) Conversion Tables (tuxch0105m000) Conversions per Field (tuxch0105m000) Create Import Program (tuxch0227m000) Import Data (on a Regular Basis) (tuxch0224m000) Import Data (Non-Regular) (tuxch0223m000) Export module To set up an export process The Export module sessions Table Relations (Export) (tuxch0531m000) Field Relations (Export) (tuxch0531m000)
1-1 1-2 1-2 1-3 1-3 2-1 2-1 2-1 2-2 2-3 2-9 2-10 2-13 2-14 2-17 3-1 3-1 3-1 3-2 3-3 3-3 3-4 3-5 3-5 3-10 3-16 3-17 3-19 3-21 3-24 4-1 4-1 4-2 4-2 4-6
Exchange User Guide i
Table of contents
Ranges (tuxch0112m000) Create Export Programs (tuxch0228m000) Export Data (on a Regular Basis) (tuxch0234m000) Export Data (Non-Regular) (tuxch0233m000) To check the results 5 Multisite control Audit trail About multisite exchange in Baan The export process The Export Done message File transport specifications The import process The Import Done message How to set up a multisite exchange The Multisite Control sessions Environments (tuxch4100m000) Exchange Links (tuxch4501m000) Activate/Deactivate Exchange Links (tuxch4201m000) Resend Rejected Messages (tuxch4203m000) Subscriptions (tuxch4502m000) Receive Remote Procedure Calls (tuxch4200m000) Generate Exchange Scheme Introduction The Generate Exchange Scheme sessions Exchange Companies (tuxch0150m000) Exchange Groups (tuxch0151m000) Table Details (tuxch0152m000) Field Details (tuxch0153m000) Import Tables (tuxch0154m000) Import Fields (tuxch0155m000) Update Field Data per Exchange Group (tuxch0255s000) Generate Exchange Scheme (tuxch0251m000) Generate Authorizations (tuxch0256m000) Miscellaneous The Logging sessions Print Log File (tuxch0215m000) Remove Log Files (tuxch0216m000) Log Table (Batch Level) (tuxch0508m000) Log Table (Batch Line Level) (tuxch0509m000) Clear Log Table (tuxch0208m000) The Tools sessions
4-9 4-11 4-12 4-15 4-18 5-1 5-1 5-2 5-2 5-3 5-3 5-3 5-4 5-5 5-5 5-5 5-6 5-9 5-12 5-16 5-18 6-1 6-1 6-4 6-4 6-6 6-7 6-8 6-10 6-12 6-13 6-14 6-15 7-1 7-1 7-2 7-4 7-5 7-7 7-9 7-10
Tahle of contents
Copy Exchange Scheme (tuxch0201m000) Delete Exchange Scheme (tuxch0222m000) Rename ASCII File (tuxch1202m000) Create ASCII File Fields and Relations (tuxch0203m000) Create Definition Files (tuxch0204m000) Print ASCII File (tuxch0202m000) Remove ASCII Files (tuxch2202m000) Check Syntax of Conditions (tuxch0206m000) Predefined Functions/Variables (tuxch0510m000) Print Exception Report for Baan Fields (tuxch0423m000) The Conversion sessions The procedure for converting data Types of conversion Procedure Conversion with Customization Convert Exchange Schemes from 6.1a (tuxch9211m000) Domains Separator Convert Conditions Replace Conditions Log file Conditions from 6.1a (tuxch0511m000) 8 Generic Exchange Scheme To install the Generic Exchange Scheme Customize the Generic Exchange Scheme Run the Generic Exchange Scheme
7-10 7-12 7-13 7-14 7-16 7-18 7-19 7-20 7-21 7-24 7-25 7-25 7-25 7-26 7-27 7-29 7-29 7-30 7-30 7-32 7-32 7-36 8-1 8-1 8-3 8-3
Table of contents
This guide is intended to assist developers who need to transfer data in and out of Baan applications. It is assumed that users have a thorough knowledge of the data model structure of the Baan system and of the Baan application. Users should also be familiar with the basic programming concepts of 3GL programming, ASCII files, and applications such as Microsoft Excel. This guide fully describes the Exchange module in Baan and how to use it. Each module in Exchange is described in a chapter in this guide. Each chapter begins with a description of the module. Next, are sections that describe all of the sessions in each module. Each session description contains the following:
n n n n
An overview of the session The procedure for using the session A picture of the session in Baan A table of all the fields in the session and how to use them
Following is a description of the contents of each of the chapters in this book. Chapter 1, Introduction, describes what data exchange is and gives a brief overview of the Exchange module in Baan. Chapter 2, Master Data, describes how to set up an exchange scheme, which is the basis for all data exchanges. Chapter 3, Import module, describes how to set up an import of data into a Baan application. Chapter 4, Export module, describes how to set up an export of data from a Baan application to another application. Chapter 5, Multisite control, describes how to set up data exchanges between multiple companies. Chapter 6, Generate Exchange Scheme, describes how to set up an exchange of data between two or more companies. Chapter 7, Miscellaneous, describes a variety of other tools in Exchange, including tools for logging, administration, and conversion. Chapter 8, Generic Exchange Scheme, describes how you can install, customize, and run generic exchange schemes.
Introduction
You can use the Exchange (XCH) module to import and export data to and from BaanERP. Data is imported and exported by writing to and reading from information contained in ASCII files. ASCII files can be in various formats to support exchange of data between third-party applications, databases, and spreadsheets. The exchange module has these primary purposes:
n
To import data for conversions from other systems and from prior releases of Baan To exchange data with other applications To interchange data between BaanERP companies to support multisite organizations
n n
Exchange is not recommended, however, when you are only transferring small numbers of records, or transferring whole tables where you do not need to perform any data manipulation.
BAAN
Exchange
ASCII file
ASCII file
Introduction
Specify the exact data to be exchanged by table and field Convert and calculate data during an exchange Export based on an audit, only the data that has changed since the last exchange Specify the order in which fields are imported Read data from other tables
n n
Introduction
For less frequent changes, or if the changes are not predictable, you can also perform the exchange on demand instead of on a fixed schedule. Not all sites require updates of all data, and you can minimize your communication costs by exactly specifying the data to be exchanged. For example, all bank sites need to have up-to-date currency exchange rates, but all sites do not need to have all the customer data for the entire bank.
ASCII Files
Exchange module
BAAN data
Job manager
Master Data Import Module Export Module Multisite Control Generate Exchange Scheme Miscellaneous
Exchange User Guide 1-3
Introduction
You can enter the general characteristics of the exchange process in the Master Data module. This information contains parameters and directories. The Master Data module also defines the layout of the ASCII file. In the Import module and the Export module, you specify the structure of the ASCII files and the relationship to the Baan tables. These modules contain the actual import and export processes as well. Use the Generation of Exchange Scheme module to specify the desired functionality of an exchange scheme. AanERP uses this information to create an exchange scheme and its related import data. The data can also be used to generate database authorizations in the Baan Tools Database Authorizations. Use the Multisite Control module to set up a batch-driven replication server. This allows you to transfer data from one system to another in one process. The Miscellaneous module provides certain utilities and informative sessions, such as utilities to copy or delete certain master data. You can use the Miscellaneous module to query the results and status of previous export and import processes.
Master Data
You can use the Exchange module to import and export data to and from Baan, and to import and export data between Baan and other applications. The procedure consists of setting up the exchange scheme and file layout for the exchange, and then performing the actual import and/or export of data to and from ASCII files. An exchange scheme defines the general parameters used during an import or export such as the location of files, use of an audit trail, and other default settings. The exchange scheme contains all definitions of data that must be imported or exported. The ASCII files, conditions, batches, table and field relations, ranges, and conversions are grouped together in an exchange scheme. The result of an import process is the data imported into Baan tables, and the result of an export process is the Baan data exported to ASCII files. You can then use these ASCII files in different applications to import data that originated in Baan.
Master Data
3 4 5
Define the fields for the ASCII file. Create a batch. Add conditions if necessary.
To export or import Baan data, you begin by setting up an exchange scheme using the Exchange Schemes (tuxch0501m000) session in the Master Data module. Because other applications store data in different formats, Baan cannot always directly exchange data with them. The best way to perform a data exchange is to convert data into ASCII text, which is readable both by Baan and other applications. The Exchange module handles the conversion of data between Baan and ASCII, the selection of the data, and the sequencing of the data in the ASCII file. After you have created an exchange scheme, you define the ASCII file to which your exchange scheme will export or import data. You do this using the ASCII Files (tuxch0102m000) session. The ASCII file consists of fields. You define the fields contained in the ASCII file by using the ASCII File Fields (tuxch0503m000) session. After you have defined the ASCII file fields, you use the Batches (tuxch0104m000) session to define the batch for the export or import. Each exchange scheme can contain more than one batch. A batch is a group of related table operations. When you have defined the batches, you can run the export or import by batch, instead of running the entire exchange scheme at once. If necessary, you can write scripts to further customize the exchange, and add them to your exchange scheme as conditions.
Exchange schemes (tuxch0501m000) ASCII files (tuxch0102m000) ASCII file fields (tuxch0503m000) Batches (tuxch0104m000) Conditions (tuxch0114m000) Parameters by Condition (tuxch0113m000)
Master Data
ASCII Files (Ctrl+Shift+A) Starts the ASCII Files (tuxch0102m000) session. Batches (Ctrl+Shift+B) Starts the Batches (tuxch0104m000) session. Conditions (Ctrl+Shift+C) Starts the Conditions (tuxch0114m000) session.
If you want to add more information, click the Text button on the toolbar to start the text editor. Follow this procedure to set up an exchange scheme:
1 2 3 4
Choose FileNew to display the Exchange Schemes (tuxch0101s000) details session. Enter the name and description of the exchange scheme you are creating. Enter the full path of the directories where Exchange files are to be stored. Set up the ASCII file configuration, indicating whether the exchange is to be based on audit, based on indicators, and how the fields in the ASCII file are separated. If this exchange scheme is copied from an existing exchange scheme, enter the parent exchange scheme on the Special tab. If you want to use the same directory for import and export on a regular basis, enter the names of the subdirectories that must overrule the default subdirectory. Enter the settings for text, multibyte, float, and log.
5 6
Master Data
If you want to add more information, click the Text button on the toolbar to start the text editor.
Master Data
Exchange Schemes (tuxch0101s000) Field General tab Exchange Scheme Description Paths Exchange Programs Enter the absolute path name (starting from the root directory) of the directory in which to write Exchange programs. Exchange uses the path name entered here on all the fields where the path name is required. Enter the absolute path name (starting from the root directory) of the directory for error files and log files. Exchange uses the path name entered here on all the fields where the path name is required. Enter the absolute path name (starting from the root directory) of the directory for ASCII files. Exchange uses the path name entered here on all the fields where the path name is required. Enter the absolute path name (starting from the root directory) of the directory for definition files. Exchange uses the path name entered here on all the fields where the path name is required. Enter the name of the exchange scheme. Enter a description of the exchange scheme. Description
ASCII Files
Definition Files
Master Data
ASCII File Configuration Based on Audit Select to export only the changed data, that is, data that is imported or exported from audit files instead of BaanERP tables. This improves the performance of data exchange. Auditing the files slows system performance, however, which you must consider when setting up Baan. Select when you want to set up a multisite exchange. This option only shows that an audit is carried out on one or more tables that are imported or exported. Baan does not check whether audit is set for the tables to be exported. You can overrule the audit procedure for batches in an exchange scheme by using the Batches (tuxch0104m000) session. For example, the audit is overruled if a batch contains tables that do not use the audit procedure. Select to include an indicator to display whether the following record is an audit action code. Codes include: I = insert or add d = delete u = update or modify n = new value If Based on Audit is selected, this option is also automatically selected. You can also select this option independently, which allows Exchange to receive information from other systems that also produce net change reports. Enter a value here if you want to use variable-length fields in the ASCII file. The value you enter here is used to separate the ASCII file fields. The default is fixed-length fields. Allowed values are characters such as \, ], ^, and _, and letters in the range [A-Z] if the Control Character check box is selected. Do not use characters that are used in the data fields that have to be exchanged. If a control character is part of the separator character, enter its value here. This option is only activated if Separator Character contains a value, indicating that the ASCII file field uses variable lengths. Enter the character you want to use to enclose strings, for example, string. Define the default format for the date. The date format is defined per field in the ASCII file that is used in an exchange scheme. If no date format is defined for an ASCII file field, the Default Date Format is selected. If the ASCII file field is created by using BaanERP audit files, the Default Date Format is set to BaanERP Number.
Based on Indicators
Separator Character
Control Character
Master Data
Special tab Parent Exchange Scheme Enter the name of the exchange scheme that is used as the parent in a multilevel exchange scheme. A parent exchange scheme is useful if you want to make small changes to an existing exchange scheme. You only copy those parts of the scheme that you want to change. The batches and table relations that you do not copy are inherited from the parent exchange scheme. Enter the subdirectory that must overrule the default subdirectory for a data import on a regular basis. This enables you to use the same directory for import and export on a regular basis. If the run numbers of the import and export run are identical, you need not move the ASCII files. During a data export on a regular basis, if an Overrule Subdirectory is not specified, the ASCII files are placed in the default subdirectory (<exchange scheme>.<run number>.i). If an Overrule Subdirectory is specified, the specified directory is used instead. If the overruling subdirectory already contains files, they are overwritten. The subdirectory is located in the ASCII file directory. Exchange reads this parameter at run time. The subdirectory can only be overruled if the ASCII file name specified in the Table Relations (Import) (tuxch0121s000) session does not contain an absolute path. Enter the subdirectory that must overrule the default subdirectory for a data export on a regular basis. This enables you to use the same directory for import and export on a regular basis. If the run numbers of the import and export run are identical, you do not have to move the ASCII files. During a data export on a regular basis, the ASCII files are placed in the default subdirectory (<exchange scheme>.<run number>.i). If the overruling subdirectory already contains files, the ASCII file is placed in the default directory <export subdirectory>.<run number>. The subdirectory is located in the ASCII file directory. Exchange reads this parameter at run time. The subdirectory can only be overruled if the ASCII file name specified in the Table Relations (Import) (tuxch0121s000) session does not contain an absolute path.
Master Data
Text, Multibyte, Float, and Log settings Increase Text Number Select to increase the text numbers when the text tables are imported. Otherwise the text numbers remain the same. Existing texts are overwritten if this is allowed in the table and field relations. Thus, text tables are handled like other tables. Select to convert table field datatypes from multibyte string to the local character type. The conversion is done directly after reading the characters in the ASCII file during a data import. When you export, a conversion is done just before the value is written to the ASCII file. Errors during multibyte conversions are not logged. Select to convert the values of the db.float and db.double table fields. Use this option if you have trouble exporting data based on the audit procedure in a client/server environment that combines a non-Intel application server with an Intel database server. Select to perform additional logging. During a data export based on audit, transactions performed on the database in the same second are logged. This is because Baan does not know the correct sequence in which the transactions were done on the import site. Additional logs are used to check the transactions. The additional log file is placed in the same directory as the normal log file and has the .tran extension. Do not select this check box if additional logging is not required. Logging is time-consuming and reduces performance. Indicates whether this exchange scheme includes text.
Multibyte Conversions
Convert Floats/Doubles
Do Additional Logging
Master Data
ASCII File Fields (Ctrl+Shift+1) Starts the ASCII File Fields (tuxch0503m000) session. Create ASCII Files (Ctrl+Shift+G) Starts the Create ASCII File Fields and Relations (tuxch0203m000) session. Use this option to create ASCII files automatically.
Define a unique logical ASCII file name with a description. In the Definition File field, define a definition file from which used to copy the ASCII file fields. If you want to add more information, click the Text button on the toolbar to start the text editor.
Master Data
ASCII Files (tuxch0102m000) Field ASCII File Description Definition File Description Enter the name of the ASCII file. Enter a description of the ASCII file. Enter the name of the definition file, if you are using one. A definition file is used to load preset ASCII file format information into the current ASCII file. Baan normally gets this definition file from another Baan system that has used the exchange tools to export some data. You can make a definiton file by using the Create Definition Files (tuxch0204m000) session. You can reuse definition files in other ASCII files. You can also leave this field blank, in which case Baan uses the definition file that you enter in the ASCII File Fields (tuxch0503m000) session. Text Indicates whether the ASCII file includes text.
Create ASCII File (Ctrl+Shift+G) Starts the Create ASCII File Fields and Relations (tuxch0203m000) session. For most exports and imports, you can choose this option to let Baan generate the ASCII file fields. You might need to modify the file formats manually, however, if you are converting data or upgrading to a new release. Recalculate Start Positions Changes all the start positions in an ASCII file having variable-length fields. Choose FileNew to display the ASCII File Fields (tuxch0103s000) details session. Enter a new field number, giving it a logical sequence number. Enter the name and description of the ASCII file field you are creating.
Master Data
4 5 6
Select the field type. If you select Numeric, also enter the numeric formatting. Enter the start position and length of the fields. If you want to add more information, click the Text button on the toolbar to start the text editor.
Master Data
ASCII File Fields (tuxch0103s000) Field Field Number Description Enter a field number for the ASCII file field. If a field separator is used, ASCII file fields are positioned according to this number. The field separator is defined in the Exchange Schemes (tuxch0101s000) session. What is important is not the actual field number, but the order of fields specified by the field number. Use numbers such as 10, 20, 30, which makes it easier to insert field numbers at a later stage. ASCII Field Enter the name of the ASCII file field. Baan automatically fills in this field if you use a data definition file of the ASCII file or BaanERP table. The ASCII file field is associated with the data found in a certain column in the physical ASCII file. These fields are mapped to BaanERP tables on the import and export file relation sessions. Enter a description of the conversion code. Indicate whether the data type of the ASCII field is alphanumeric, numeric, or multiline text. Enter the column number in an ASCII file where the ASCII file field starts. The start position declares the position of the data in the physical ASCII file. If no field separator is defined in the details session of the Exchange Schemes (tuxch0501m000) session, you must specify the start position. Length Specify the length of a variable-length ASCII file field as either numeric or alphanumeric. You do not need to specify the length of a fixed-length field. The length of an ASCII file field that represents a multiline text is zero. Numeric Format Date Format Define a date format for a numeric field in an ASCII file. If no date format is defined for an ASCII file field, the Default Date Format is used. Select to be able to place the decimal point at any position in the ASCII file field without the decimal actually being present. The number of digits after the decimal point must be specified in Number of Digits after Decimal. The number of digits after a floating decimal point defines where the decimal point is placed in a numeric field. This field is only activated if Floating Decimal is selected.
Floating Decimal
Master Data
Batches (tuxch0104m000)
Use the Batches (tuxch0104m000) session to create the available batches for an exchange scheme. A batch is used to group operations on related tables and is identified by a unique code. An exchange scheme can contain one or more batches. The exchange process can run by batch, which means that the entire exchange scheme does not have to run at once. The Specific menu contains these options:
n
Table Relations (Import) (Ctrl+Shift+1) Starts the Table Relations (Import) (tuxch0521m000) session. Table Relations (Export) (Ctrl+Shift+2) Starts the Table Relations (Export) (tuxch0531m000) session. (De)activate Table Relations (Ctrl+Shift+G) Starts the (De)activate Table Relations (Import) (tuxch1221m000) session.
Define a unique code, sequence number, and description for the batch. Enter the company number that contains the data to be exported during an export procedure, or the company number to which the data must be written during an import procedure. If the exchange process is based on audit logs, select Exchange Based on Audit. If you want to add more information, click the Text button on the toolbar to start the text editor.
3 4
Figure 9, Batches
Master Data
Batches (tuxch0104m000) Field Batch Sequence Number Description Company Description Enter a batch name. Enter a number to determine the order in which the batches are processed. Enter a description of the batch. Enter the company that receives or produces the tables affected by the transactions. The company number entered here must have the same package combination as the current company. Select if you want the physical ASCII file to be exported from the audit logs instead of from the Baan tables. Exporting from audit logs means that only updated data is exported. Exporting from the Baan tables means that all the data contained in those tables is exported. Indicates whether this batch includes text.
Based on Audit
Text
Conditions (tuxch0114m000)
Use the Conditions (tuxch0114m000) session to list the available conditions for an exchange scheme. Conditions are used to affect the import or export of data. Conditions are used in the generated scripts to guard an action (such as Add Record or Stop Condition), to supply a value for a table field during an import, or to supply a value for an ASCII field during an export. You write conditions in Baan 3GL code by using the Baan text editor. You only need to write the body of the function because the script generators add the function header and enclosing braces automatically. To learn more about the Baan 3GL code, see the Programmers Manual. When you use a condition as a guard action, Baan expects the return value to be a Boolean true or false. This type of condition is used at the table-relation level to control actions concerning the entire record and is used at the field level to control the concept of overwrite. There are five such conditions and all of them control aspects of the import process. Four of them are included in the Table Relations (Import) (tuxch0521m000) session and the fifth is included in the Field Relations (Import) (tuxch0522m000) session.
Master Data
Check Syntax of Conditions (Ctrl+Shift+G) Performs a syntax check. If the condition script is written and the check is successfully completed, Script and Syntax OK are automatically selected. Parameters by Condition (Ctrl+F1) Starts the Parameters by Condition (tuxch0113m000) session.
Define a unique condition code, description, and condition type. Define the corresponding domain for conditions with the Enumerate and Set condition type. Click the Text button on the toolbar to write the condition script.
Predefined functions and variables are available in the Predefined Functions/Variables (tuxch0510s000) session. Set the conditions at table level in the Table Relations (Import) (tuxch0521m000) details session and the Table Relations (Export) (tuxch0531m000) session. Set the conditions on field level in the Table Relations (Import) (tuxch0521m000) details session and the Field Relations (Export) (tuxch0532m000) session.>>
Master Data
Conditions (tuxch0114m000) Field Condition Description Type Domain Script Description Enter the name of the condition. Enter a description of the condition. Choose the datatype of this condition. Enter the domain that corresponds to this condition. Indicates whether a script is present. You can add a script by choosing EditText or by clicking the T button on the toolbar. Indicates whether the syntax of the condition script has been checked. To select the syntax check, choose Special Check Syntax.
Syntax OK
Master Data
Parameters by Condition (tuxch0113m000) Field Parameter Parameter Type Description Enter the name of the parameter. The parameter name must be the same as an ASCII field name. Enter either numeric or alphanumeric for the parameter type.
Master Data
Import module
Introduction
To exchange data between two Baan companies, you export the Baan data to ASCII files, and then import the data into the Baan database. Exchange can use the same master data information for import that it uses for export, because the ASCII file format must be the same. If data must be modified during an import, you can use a conversion. The Exchange module includes three options: condition scripts, conversion tables, and constant values. You can include a formula with the script to calculate new values based on the contents of the ASCII file or data from other Baan tables.
Import Data (on a Regular Basis) (tuxch0224m000) Import Data (Non-Regular) (tuxch0223m000) Export Data (on a Regular Basis) (tuxch0234m000) Export Data (Non-Regular) (tuxch0233m000)
Non-regular data exchange is useful when critical data has changed that needs to be updated, or when not all of the data has changed and you want to update only the changed data. Non-regular data exchange is also used when you want to test an exchange scheme before approving it for regular data exchange. For a nonregular data exchange, you can select a range of batches or a range of batch sequence numbers to import. The data exchange is restricted to these ranges.
Import module
Regular data exchange is used when you want to maintain several sites whose data changes periodically. Regular data exchange is also useful in multisite situations where it is critical that no run is lost, overwritten, imported twice, or imported in the incorrect order. Only complete exchange schemes can be imported and exported in a regular run, which ensures that no part is missed. Regular data exchange uses the run number. The run number is unique and consecutive for a combination of exchange scheme and exchange type and is based on the contents of the log table. Each redo is stored under a new try number, which is unique within a run number, exchange scheme, and exchange type combination. Regular and non-regular data exchange differ in where they place the physical ASCII files. A non-regular data exchange places the data in the sequential file directory, named at the exchange scheme level, in a file named in the Table Relations (tuxch0531m000) session. A regular data exchange builds an extra directory for each run of an export in order to retain a history of all exported files.
Import module
DAL settings are run time aspects, which means you can change them without having to regenerate the import program. DAL settings are also logged in the log table at batch line level, to enable you to find out what the DAL settings were when the import was run. It is important to realize that an update through the DAL can result in a number of side effects. Actions done by the DAL should not be twice. For example, if the DAL updates the available to promise (ATP) quantity for an item when importing order data, the ATP quantity should not be updated in a condition script as well. You should therefore not add any actions in condition scripts, or import additional data, that are already handled in the DAL.
Import module
If records are rejected due to validation checks or errors, BaanERP writes them to a log file. You can redo the data exchange for those rejected records only. You can use the Print Log File (tuxch0215m000) session to print the rejected records stored in the log file. BaanERP verifies the imported values according to the referential integrity and validation rules, such as field type, length, range, and format. This information is available in the data dictionary.
Table Relations (Import) (tuxch0521m000) Field relations (import) (tuxch0522m000) Conversion Tables (tuxch0105m000) Conversions per Field (tuxch0105m000) Create Import Program (tuxch0105m000) Import Data (on a Regular Basis) (tuxch0224m000) Import Data (Non-Regular) (tuxch0223m000)
Import module
Field Relations (Import) (Ctrl+Shift+1) Starts the Field Relations (Import) (tuxch0522m000) session. (De)activate Table Relations (Ctrl+Shift+G) Starts the (De)activate Table Relations (tuxch1221m000) session.
Enter the sequence number, BaanERP table, logical ASCII file, and the physical ASCII file name. Select Active to make the relation active and define an execute condition. Under Permitted Operations, specify the actions that are allowed for this table relation, and the appropriate conditions. Select Stop Condition to activate the stop mechanism and define the appropriate stop condition. If you want to use the functionality programmed into the Data Access Layer (DAL), select Import via Data Access Layer. If you want to use an external program, select External Program and enter the program name in the following field. If you want to run a BaanERP session, clear External Program and enter a session or object code in the following field. If one of the ASCII file fields is based on increment, enter the number of the index.
Import module
If you want to add more information, click the Text button on the toolbar to start the text editor.
Import module
Table Relations (Import) (tuxch0121s000) Field Table Relation (Import) Description Enter the the number that represents the table relation in the batch during an exchange process. The table relation shows the correspondence between a database table and an ASCII file. Enter a number to determine the process sequence order of the table relation in the batch during an exchange process. The sequence number does not have to be unique in a table relation. If two table relations with an identical sequence number are used in a batch, the relation with the lower table relation number is processed first. Enter the table that contains data from the ASCII file to be read during an import procedure. One batch line can only read one Ban table. If you need to use the same Baan table to create more than one physical file, you can use multiple batch lines. The different batch lines may or may not use the same ASCII file layout. Use multiple table relations to write data from more than one physical ASCII file to one BaanERP table. The BaanERP table name is defined by the package code, a module code, and a table number, for example, tiitm001.
Sequence Number
Baan table
Import module
ASCII file
Enter the name of the ASCII file that contains data to be transferred to a BaanERP table during an import procedure. To create the field relations of the table relation automatically, the ASCII file name must be the same as the BaanERP table name. You can do this if you do not have a data definition file of the ASCII file. The ASCII file name represents the logical ASCII file. You can create the ASCII file name in the ASCII Files (tuxch0102m000) session.
Enter the name of the physical ASCII file where the data is to be written. The maximum length of the file name is 11 characters. The file name entered here is an extension of the default path. The default path is defined in the Path for ASCII Files field under Paths on the General tab in the Exchange Schemes (tuxch0101s000) session. If this is an absolute path, the default path is not used. If this is not an absolute path, the file is stored in the directory for sequential files as defined in the exchange scheme header record.
Active
Select the Active field to make the table relation active so that it can be used for data processing in an import process. If this option is clear, the table relations are kept for reference purposes but are not used during the import process. You can also use it as a debugging tool by turning off all table relations except one to test a new change. Select if you want to test the exchange scheme, a single table relation, or only a few table relations.
Execute Condition Use to check whether the table relation must be carried out when you run the import process. If the Active field is selected, Baan checks the execute condition before running the table relation. If the execute condition returns true, the table relation is carried out. The execute condition is carried out before the table relation is started but after the previous table relations are finished. If the import is based on audit or indicators, the execute condition is carried out at the start of a batch. If Active is selected but no execute condition is specified, the table relation is always executed when the batch is run. You can generate a new condition or edit the specified condition. If you generate a new execute condition, the condition code is the ASCII file name with the extension .exe. The execute condition must be of Boolean type.
Import module
Permitted Operations Add Condition Select to import all inserts for which a record does not yet exist in the database. If you specify an add condition, Exchange only processes the records that meet the add condition. If you do not specify an add condition, Exchange processes all inserts. Clear if you do not want Exchange to import inserts. This causes Exchange to skip any record to be inserted. For a full import, inserts consist of all records. For import based on audit or based on indicators, inserts are records having indicator i. Overwrite Condition Select to import all inserts for which a record does not yet exist in the database. If you specify an overwrite condition, Exchange only overwrites existing records if the records to be imported meet the overwrite condition. If you do not specify an overwrite condition, Exchange overwrites all existing records. Clear if you do not want Exchange to import inserts. This causes Exchange to skip any record to be inserted. For a full import, inserts consist of all records. For import based on audit or based on indicators, inserts are records having indicator i. Update Condition Select to import all updates (records having indicator u). If no update condition is specified, all updates are processed. If an update condition is specified, only the records that meet the update condition are processed. Clear if you do not want Exchange to import updates. This causes Exchange to skip any record to be updated. This field is only relevant when your exchange is based on audit or on indicators. Delete Condition Select to import all deletes (records having indicator d). If you specify a delete condition, Exchange processes only the records that meet the delete condition. If you do not specify a delete condition, Exchange processes all deletes. Clear if you do not want Exchange to import deletes. This causes Exchange to skip any record to be deleted. This field is only relevant when your exchange is based on indicators or on audit. Stop Mechanism Select if you want the import process to stop when the return value of the stop condition is true.
Import module
Stop Condition
Enter a stop condition. A stop condition causes the exchange process to stop if the return value of the stop condition is true. If the return value is false, the import process continues with the next batch line. The stop condition is carried out at the end of each table relation. You can automatically generate a stop condition, in which case the stop condition code is the same as the ASCII file code with the .stp extension. This condition is of the Boolean type.
Specific tab Data Access Layer Import via Data Access Layer Select to use the Data Access Layer (DAL) for the current table. By using the DAL, an import carries out all the constraint checks, integrity checks and side effects, such as updates on other tables, that are programmed into the DAL. This guarantees database integrity, saves programming time, and avoids the errors that can occur in condition scripts. Select to use the Data Access Layer (DAL) property checks. Using property checks is safer, but you can turn them off to boost performance. Select to use an external program and enter its name in the next field. Clear to run a BaanERP session, and enter a session or object code in the following field. Enter the name of the external program to be used, or enter a session or object code to run a BaanERP session. Enter the number of the index on which you want to sort. Indicates whether this table relation includes text.
Import module
Baan fills in the value in the ASCII field automatically, using the logic from the Baan Field, Condition, and Context fields. The Specific menu contains this option:
n
Create Default Import Field Relations (Ctrl+Shift+G) Creates the field relations automatically. Make sure that the code of the ASCII file is identical to the BaanERP table code. Use this option if the definition file of the ASCII file is not available. Choose FileNew to display the Field Relations (Import) (tuxch0122s000) details session. Enter a serial number, giving it a logical sequence number. Enter the name of the field for which you are creating field relations. If the field is defined as an array in the data dictionary, enter the array element number. Define the field value, condition script name, and constant, if this field is using them. If you want to add more information, click the Text button on the toolbar to start the text editor.
4 5
Import module
Import module
Field Relations (Import) (tuxch0122s000) Field Serial number Description Enter a serial number to make the field relation unique in the table relation. The serial number is only used as an identifier and does not have to be sequential. It is best to use intervals of 10 so that you can insert a new record between existing records if that is where it logically belongs. Enter the name of the field to be updated in the Baan table. During import, Baan fills in the values of this field with data from a field in an ASCII file, based on the rules you define in the Based On field. Enter the element number of an array field if the table field named in Baan Field is defined as an array in the data dictionary. The elements in an array can be filled individually. The element number cannot exceed the array depth. Select to modify data in a field relation before the data of an ASCII file field is transferred to the BaanERP table field. In the next field, enter the ASCII file field to be modified. If you have selected Field value, enter the conversion table for the ASCII file field. Fill in the conversion parameters in the Conversion Tables (tuxch0105m000) session. Enter the name of the condition you are using, if any. You use a condition either if the data to be imported resides in a table other than the table defined at the Table Relation level, or if the data does not exist in any Baan table. You can use a condition to access the different table or table fields necessary to calculate the value that must be imported. The conditions are created in the Conditions (tuxch0114m000) session. Conversion If you have selected Condition, enter a conversion table here. Use a conversion code to modify data in a field relation before the return value of a condition is transferred to the BaanERP table field. You can create conversion tables in the Conversion Tables (tuxch0105m000) session.
Baan Field
Array Element
Conversion
Condition
Import module
Constant
Select to load a constant value into a BaanERP table field. In the Conversion field that follows, enter the conversion table that modifies the data in a field relation before the constant value is transferred to the BaanERP table field. When the Based On field is Increment, the value in this field is added to the start value when the higher fields of the primary index remain constant.
Conversion
If you have selected Constant, use this field to enter the name of the conversion table that modifies the field relation data before the constant value is transferred to the BaanERP table field. Conversion tables are created in the Conversion Tables (tuxch0105m000) session.
Increment
Select to base the import on increment. The Baan field is incremented with the value in the Constant field. Increment can only be used for numeric fields that are part of the primary index. Enter the initial value of the series for the Baan field. You can only maintain this field if the Based On field is Increment. During processing, whenever one of the higher fields of the primary index changes, the Baan field is filled with the Start Value. Select to transfer the default value as defined in the data dictionary to the Baan Table field. Indicates whether this field relation includes text.
Start Value
Increment Value Default Text Text Settings Text Number Append Text Text Language Text Language Field Permitted Operations Overwrite Field Select to overwrite the field based on the condition defined in the following field. When an existing record is inserted, if no condition is specified or if the return condition returns true, the field is overwritten. If the Overwrite Field is selected, enter a condition here. When an existing record is inserted, if the return value of the overwrite condition is true, the value of the field is overwritten.
Text/Conditions tab
Condition
Import module
You can automatically generate a condition if you click Create/Edit. The condition for overwriting code contains the ASCII file code with the .ovr extension. The condition must be of the Boolean type. Preconditions for the overwrite condition are: Update Field The type of action is Insert. All ASCII fields are filled. The record already exists. BaanERP table fields are filled with this record.
Select to update a record when the return value of the update condition is true. Enter the update condition in the following field. If Update Field is selected, enter a condition code. The field is updated when the return value of the update condition is true. During an import based on indicators or an import based on audit, records that must be updated start with the letter u. You can automatically generate a condition if you click Create/Edit. In that case, the condition for overwriting code contains the ASCII file code with the .upd extension. This condition is of the Boolean type. Preconditions for the update condition are: The type of action is update (old values). ASCII file fields are filled: primary key fields of the source table on the export site and values that are changed. The record that must be updated exists. BaanERP table fields are filled with an existing record.
Condition
Import module
Field Relations (Import) (tuxch0122s000) Field Relations (Export) (tuxch0132s000) Conversions per Field (tuxch0106m000) Choose FileNew to create a conversion relation. Enter its name and description. To change a conversion relation, double-click the existing conversion relation. Choose the FilePrint to print the conversion relations.
Import module
Conversion Tables (tuxch0105m000) Field Relation Description Enter the relation name. All the relations for one exchange scheme are stored together in this table. In order for Baan to know which rules to use for a particular field, give the same relation name to all translation rules that are logically grouped together. Enter a description of the conversion table. Enter the source system value. Enter the Baan value.
Load Conversions per Field Conversions per Field (tuxch0106m000) session, which you can use to convert data in BaanERP table fields according to a conversion table. Choose FileNew to create a new conversion for a BaanERP table. Enter the exchange scheme for which you want to create conversions. Enter the names of the Baan table, field, and conversion relation.
Import module
To change an existing conversion, double-click on an existing conversion for a BaanERP table field.
Conversions per Field (tuxch0106m000) Field Baan Table Description Enter the name of the table whose contents are to be converted. This overrides the rule in the Field Relations (Import) (tuxch0522m000) session. Enter the field whose contents are to be converted. This overrides the rule in the Field Relations (Import) (tuxch0522m000) session. Enter the field to be used during data exchange.
Baan Field
Conversion
Import module
Enter the range of exchange schemes and batches for which you want to create import programs. Specify the compile options.
Import module
Create Import Programs (tuxch0227m000) Field Selection Range Exchange Scheme Batch Compile Options Compile in Debug Mode Compile with Profiler Display Errors Select to go through a condtion script step by step. Select to compile with the profiler. After the import has run, the Profiler generates a report that provides information about the performance time required for each function. Select to get a detailed list of errors showing the exact problem with each line of code. Enter the exchange scheme to be compiled. Enter the batch number of the exchange scheme. Description
Import module
Select a range of exchange schemes. Select the processing type. Select the Overrule Batch Company check box if the data is imported from a company other than the batch company. Enter another company if the current company is overruled. Define the details of the import procedure in the Processing Details group box. Click Import Data to start the import procedure. Click Log Table to view the contents of the log table. A log table gives an overview of the results of the import procedure.
Import module
Import Data (on a Regular Basis) (tuxch0224m000) Field Selection Range Exchange Scheme Processing Type Enter the name of the exchange scheme. Description
Processing Settings Choose the type of run for this data exchange:
n n
New run Restart previous run This option allows you to import data by using the last run number over again. This field is usually used in the Import Data (on a Regular Basis) (tuxch0224m000) session where each run number provides different data sets. The log files are the only thing that is affected in this session, because the data to be loaded into Baan is the same for both the last run number used and the first free run number. Reprocess rejected records When records are rejected during an import process, Baan creates two additional files to hold the rejected records. Records that are rejected due to index or domain errors (database problems) are placed in the Rejected due to Error file and records that are rejected due to a condition returning a false status are placed in the Rejected due to Condition file. Baan places these files in the same directory as the data file that was read in and appends the suffixes .e01 or .c01 to them. If more records are rejected during reprocessing, Baan creates new files with the next sequential number. When you choose this option, you can use the next two fields to choose which records to reprocess. Continue interrupted run If an exchange scheme run stops in the middle of the run, you can restart the import. You can only do this if there is more than one batch line and the restart can begin at the start of the batch line that was not completed. If there is only one batch line, this option is the same as a complete restart of the import.
This field is only activated if you chose Reprocess Rejected Records in Processing Type. This field is only activated if you chose Reprocess Rejected Records in Processing Type.
Import module
Enter Yes to override the value in the Company field in The Batches (tuxch0104m000) session. Enter the company to be used during this session instead of the batch company. This field can only be defined if Overrule Batch Company is selected. Select to quit when the return value of a stop condition is true. Clear if you want the import to continue running and write a message to the log file. The stop condition is defined in the Table Relations (Import) (tuxch0121s000) session. Select to cause messages to remain on screen until you press Enter. Clear if you want the import program to continue without any interaction from you. This option can be used for an import that runs throughout the night. Select if you want the import to complete without checking for other import batches. This option can be used to test or run the import without using data that is waiting to be imported at the export site. This is useful when testing an import in a multisite environment. If you clear this and an active exchange link exists for a batch, that batch will only run if there is data waiting to be imported. For example, if there is no batch to import. This field is only relevant when you are using multisite control, and the batch is used in one or more exchange links.
Select when you want to restore compressed ASCII files to their original format before the import procedure. Only use this option if the ASCII files that will be imported were compressed using the BaanERP compression program.
Import module
Select a range of exchange schemes, batches, and/or batch sequence numbers. Select the processing type. Enter the start and end time of the audit range if the import is based on audit. Select the Overrule Batch Company check box if the data is imported from a company other than the current company. Enter another company if the current company is overruled. Select the Wait for <CR> with Messages check box if the import program must stop after a message. Click Import Data to start the import procedure. Click Log Table to view the contents of the log table. A log table gives an overview of the results of the import procedure.
Import module
Import Data (Non-Regular) (tuxch0223m000) Field Selection Range Exchange Scheme Batch Batch Sequence Number Processing Type Enter the exchange scheme. Enter the batch in the exchange scheme. Enter the batch sequence number. Description
Processing Settings Choose the type of run for this data exchange:
n n
New run Restart previous run This option allows you to import data using the last run number over again. This field is usually used in the Import Data (on a Regular Basis) (tuxch0224m000) session, where each run number provides different data sets. Only the log files are affected in this session, because the data to be loaded into Baan is the same for both the last run number used and the first free run number. Reprocess rejected records When records are rejected during an import process, Baan creates two additional files to hold the rejected records. Records that are rejected due to index or domain errors (database problems) are placed in the Rejected due to Error file and records that are rejected due to a condition returning a false status are placed in the Rejected due to Condition file. Baan places these files in the same directory as the data file that was read in and appends the suffixes .e01 or .c01 to them. If more records are rejected during reprocessing, Baan creates new files with the next sequential number. If you choose this option, you can use the next two fields to choose which records to reprocess. Continue interrupted run If an exchange scheme run stops in the middle of the run, you can restart the import if there is more than one batch line and the restart can begin at the start of the batch line that was not completed. If there is only one batch line, this option is the same as a complete restart of the import.
Enter Yes to override the value in the Company field in the Batches (tuxch0104m000) session. Enter the company to be used in the Company field in this session.
Import module
Processing Details Really Quit on Stop Condition Wait for <CR> with Messages Select to quit on a stop condition, or clear if you want the import to continue running and only return an error message if it meets the stop condition. Select to have messages remain on screen until you press Enter.
Export module
Sometimes you need to export data from Baan to another application, for example, when:
n n n
Data must be shown in a specific way such as in a spreadsheet. Text is to be maintained by using a word processor. The data and procedures in a company are handled partly by Baan.
The result of the export process is an ASCII file, which other applications, including other Baan environments, can read. To exchange data between two Baan companies, you export the Baan data to ASCII files, and then import the data into the Baan database. Exchange can use the same master data information for import that it uses for export, because the ASCII file format should be the same.
Export module
Table Relations (Export) (tuxch0531m000) Field Relations (Export) (tuxch0531m000) Ranges (tuxch0112m000) Create Export Programs (tuxch0228m000) Export Data (on a Regular Basis) (tuxch0234m000) Export Data (Non-Regular) (tuxch0233m000)
BAAN
Field Relations (Export) (Ctrl+Shift+1) Starts the Field Relations (Export) (tuxch0532m000) session. (De)activate Table Relations (Ctrl+Shift+G) Starts the (De)activate Table Relations (tuxch1221m000) session.
Export module
Choose FileNew to display the Table Relations (Export) (tuxch0131s000) details session. Enter a number in the logical sequence for the table relation. Enter the table from the ASCII file and the name of the ASCII file to be used during an export. Enter the physical ASCII file to be written. Enter the other parameters that define this table relation. If you want to add more information, click the Text button on the toolbar to start the text editor.
Export module
Table Relations (Export) (tuxch0131s000) Field Table Relation (Export) Description Enter the number that represents the table relation in the batch during an exchange process. The table relation shows the correspondence between a database table and an ASCII file. Enter the table that contains data from the ASCII file to be read during an export procedure. One batch line can only read one Baan table. If you need to use the same Baan table to create more than one physical file, you can use multiple batch lines. The different batch lines may or may not use the same ASCII file layout. Use multiple table relations to write data from more than one physical ASCII file to one BaanERP table. The BaanERP table name is defined by the package code, a module code, and a table number, for example, tiitm001. ASCII File Enter the name of the ASCII file that contains data to be transferred to a BaanERP table during an export procedure. To create the field relations of the table relation automatically, the ASCII file name must be the same as the BaanERP table name. You can do this if you do not have a data definition file of the ASCII file. The ASCII file name represents the logical ASCII file. You can create the ASCII file name in the ASCII Files (tuxch0102m000) session.
Baan Table
Export module
Enter the name of the physical ASCII file where the data is to be written. The maximum length of the file name is eleven characters. The file name entered here is an extension of the default path. The default path is defined in the Path for ASCII Files field under Paths on the General tab in the Exchange Schemes (tuxch0101s000) session. If this is an absolute path, the default path is not used. If this is not an absolute path, the file is stored in the directory for sequential files as defined in the exchange scheme header record.
Active
Select to activate the table relation so that it can be used for data processing in an export process. If this option is cleared, the table relations are kept for reference purposes but are not used during the export process. You can also use it as a debugging tool by turning off all table relations except one to test a new change. Select if you want to test the exchange scheme, a single table relation, or only a few table relations.
Use bdbpre
Select to ignore the layout of the ASCII file and let the standard bdbpre program create the ASCII file. The range, sort index, and ASCII file fields are not considered. Clear to create the sequential ASCII file using the ASCII file fields that are created in the ASCII File Fields (tuxch0103s000) session. This option is not applicable for an exchange based on audit. If you change this field, you must generate the exchange program again.
Condition
Enter a condition code. The condition must be of the Boolean type. The export of data depends on the return value of this condition. If the return value of the condition is true, the data of the BaanERP table is written to the ASCII file. If the return value of the condition is false, the data of the BaanERP table is not written, that is, the export is not done. Conditions are also used during an exchange based on audit.
Range Active
Select if you want Baan to process the table relation by using the limitations defined in the Ranges (tuxch0112m000) session. Clear if you do not want Baan to use the limitations defined in the Ranges (tuxch0112m000) session. The range is not active if the export is part of an audit procedure or if Use bdbpre is selected.
Export module
Sort Index
If you want to export the data using any of the indexes from the table listed in the Baan table field, enter the index number of the ASCII file that will contain data from the BaanERP table. If the table is read, this index is used and the ASCII file is sorted according to this index. Indicates whether this table relation includes text.
Create Default Field Relations (Ctrl+Shift+1) Creates the field relations automatically. Make sure that the code of the BaanERP table is the same as the code of the ASCII file table. Use this option if the definition file of the BaanERP table is not available.
Export module
Export module
Field Relations (Export) (tuxch0132s000) Field Serial Number Description Enter a serial number to make the field relation unique in the table relation. The serial number is only used as an identifier and need not be sequential. It is best to use intervals of ten so you can insert a new record between existing records if that is where it logically belongs. Enter the code of the ASCII file field to contain the data transferred from a field in the BaanERP table during an export procedure. The ASCII file code represents the logical ASCII file. It is created in the ASCII Files (tuxch0102m000) session. Based on Baan Field Select and enter the name of a Baan field on which the data transfer is based. This value is passed to the physical ASCII file in the position designated by the ASCII Field. Enter the element number of an array field if the table field named in Baan Field is defined as an array in the data dictionary. The elements in an array can be filled individually. The element number cannot exceed the array depth. Enter the name of the condition you are using, if any. You use a condition either if the data to be exported resides in a table other than the table defined at the Table Relation level, or if the data does not exist in any Baan table. You can use a condition to access the different table or table fields necessary to calculate the value that must be exported. The conditions are created in the Conditions (tuxch0114m000) session. Constant Select to import a constant value into a BaanERP table field or to export a constant to an ASCII file field. Use this field to pad the file with additional data if the receiving system requires additional data fields.
ASCII Field
Array Element
Condition
Export module
Ranges (tuxch0112m000)
Normally even if the entire table is not needed, all the data is exported anyway and only the desired records are read in during import. This control is achieved by writing conditions that are used at the table relation (import) level. Baan also provides a tool to limit which records are exported to begin with. The Ranges (tuxch0112m000) session allows you to use relational and logical operators to create range-limitation logic expressions that control the export process. Only active records that match the condition are exported. This enables you to transfer a smaller file between systems. The drawback is that the filter cannot be as complex, because the range limitation logic is not as powerful as conditions. To activate this session, select the Range Active field in the Table Relations (Export) (tuxch0531m000) session. The following are the data type restrictions per data type of the BaanERP table field: Date data type
n n n
The Entered Date field must be of the default date format. The plus or minus signs can be used to change the current date. For example, +2 adds two days to the current date. The number sign (#) can be used for the current date.
The domain of the BaanERP table field determines if a field is justified to the left, right, or center, or converted to uppercase or lowercase.
For the operators in or not in, the value must be entered as follows:
n n
The set of values must be placed between parentheses. For string data type, each item in the set of values must be placed between double quotation marks.
EXAMPLE:
For a numeric field (1,2,5,7). For a string or multibyte string, double quotes must be added: ("a","b").
Export module
Enter a serial number in the logical sequence order. Enter the rule that specifies the range of table fields to be checked. Enter a relational or logical operator to create range-limitation logic expressions to control the export. Enter the from and to values that apply to the Baan field.
Ranges (tuxch0112m000) Field Serial Number Baan Field Description Enter a number to ensure the correct sorting sequence. Enter a rule to specify the range of table fields to be checked. If the rule involves more than one field, you can use two lines to express the range. Enter a relational or logical operator to create range limitation logic expressions to control the export process. The Operator performs a check between the Baan field and the Value From and Range Value To fields. Enter the limits that are applied to the Baan field. You can use this only for the between and not between operators. If the range rules need more than one line to be expressed properly, enter an and or an or in the And/Or/End field to join the multiple lines. When a range expression goes over one line, the sequence number is the only determination of which line is to be read next. All range limitations must end with the end of expression choice.
Operator
Export module
Select a range of exchange schemes and batches. Select the check boxes under Compile Options to specify how the import program must be created. Click Create to start the creation of the export program. Click Export Data to start the Export Data (Non-Regular) (tuxch0233m000) session that will run the export program that is created in this session.
Export module
Create Export Programs (tuxch0228m000) Field Selection Range Exchange Scheme Batch Compile Options Compile in Debug Mode Compile with Profiler Display with Errors Select to go through a condition script step by step. Select to compile with the profiler. After the import has run, the profiler generates a report that provides information about the performance time required for each function. Select to get a detailed list of errors showing the exact problem with each line of code. Enter an exchange scheme. Enter a batch. Description
Export module
The session Import Data (on a Regular Basis) (tuxch0224m000) uses a similar directory naming convention to look for incoming data. The only difference is the last letter, which is an i for imports. The export can also run as part of a batch job. Follow this procedure to create a regular export:
1 2 3 4 5 6 7 8
Select a range of exchange schemes. Select the processing type. Enter the start and end time of the audit range if the export is based on audit. Select the Overrule Batch Company check box if the data is exported from a company other than the batch company. Enter another company if the current company is overruled. Define the details of the export procedure in the Processing Details group box. Click Export Data to start the export procedure. Click Log Table to view the contents of the log table. A log table gives an overview of the results of the export procedure.
Export module
Export Data (on a Regular Basis) (tuxch0234m000) Field Selection Range Exchange Scheme Processing Type Enter a range of exchange schemes. Description
Processing Settings Choose the type of run for this data exchange:
n n
New run Restart previous run This option allows you to import data using the last run number over again. This field is usually used in the Import Data (on a Regular Basis) (tuxch0224m000) session, where each run number provides different data sets. Only the log files are affected in this session, because the data to be loaded into Baan is the same for both the last run number used and the first free run number. Reprocess rejected records When records are rejected during an import process, Baan creates two additional files to hold the rejected records. Records that are rejected due to index or domain errors (database problems) are placed in the Rejected due to Error file and records that are rejected due to a condition returning a false status are placed in the Rejected due to Condition file. Baan places these files in the same directory as the data file that it was read in and appends the suffixes .e01 or .c01 to them. If more records are rejected during reprocessing, Baan creates new files with the next sequential number. When you choose this option, you can use the next two fields to choose which records to reprocess. Continue interrupted run If an exchange scheme run stops in the middle of the run, you can restart the import. You can only do this if there is more than one batch line and the restart can begin at the start of the batch line that was not completed. If there is only one batch line, this option is the same as a complete restart of the import.
Enter a Yes to override the value in the Company field in the Batches (tuxch0104m000) session. Enter the company to be used during this session instead of the batch company. This field can only be defined if Overrule Batch Company is On.
Export module
Processing Details Wait for <CR> with Messages Select to cause messages to remain on screen until you press Enter. Clear if you want the export program to continue without any interaction from you. This option can be used for an export that runs throughout the night. Select if you want the export to complete without checking for messages that indicate that the export procedure is completed. If you clear this option, an Export Done message is sent, but only if there is a subscription for the batch. This option can be used to test or run the export. This is useful when testing an export in a multisite environment. Compress ASCII Files Select when you want to compress files after they are exported. Only use this option if the ASCII files to be exported are compressed using the BaanERP compress program. Enter the start date and time of the audit range. Select to set the end date and time of the audit range to the current date and time. All transactions between the specified start time and date and the current time and date are exported. This is important if the export procedure is part of a job. Every time the job is started, the end of the audit range will be the current time and date. The length of the interval is therefore not fixed. The ends of audit range fields do not have to be specified. Export to Current Date/Time Select to have this export continue until the current date and time.
Export module
This is not allowed in a regular export because it is possible to miss one period of audit information for one batch line while the rest of the batch lines are complete. The export can also run as part of a batch job. Follow this procedure to run the export program:
1 2 3
Select a range of exchange schemes, batches and/or batch sequence numbers. Select the processing type. Select the Overrule Batch Company check box if the data is exported from a company other than the current company. In such a case, define that company in the next field. Select the Wait for <CR> with Messages check box if the export program must stop after a message. Enter the start and end time of the audit range if the export is based on audit. Click Export Data to start the export procedure. The screen changes and a status window displays the progress of the export. For each batch line that completes, Baan displays the exchange scheme, the batch, and the batch line. The numbers of records read, processed, rejected due to error, and rejected due to conditions are also displayed. Click Log Table to view the contents of the log table. A log table gives an overview of the results of the export procedure.
4 5 6
Export module
Export Data (Non-Regular) (tuxch0233m000) Field Selection Range Exchange Scheme Batch Sequence Number Processing Type Enter a range of exchange schemes. Enter a range of batches. Enter a range of sequence numbers. Description
Processing Settings Choose the type of run for this data exchange:
n n
New run Restart previous run This option allows you to import data reusing the last run number. This field is usually used in the Import Data (on a Regular Basis) (tuxch0224m000) session where each run number provides different data sets. The log files are the only thing that is affected in this session, because the data to be loaded into Baan is the same both for the last run number used and the first free run number. Reprocess rejected records When records are rejected during an import process, Baan creates two additional files to hold the rejected records. Records that are rejected due to index or domain errors (database problems) are placed in the "Rejected due to Error" file and records that are rejected due to a condition returning a false status are placed in the "Rejected due to Condition" file. Baan places these files in the same directory as the data file that it was read in and appends the suffixes .e01 or .c01 to them. If more records are rejected during reprocessing, Baan creates new files with the next sequential number. When you choose this option, you can use the next two fields to choose which records to reprocess. Continue interrupted run If an exchange scheme run stops in the middle of the run, it is possible to restart the import. You can only do this if there is more than one batch line and the restart can begin at the start of the batch line that was not completed. If there is only one batch line, this option is the same as a complete restart of the import.
Enter a Yes to override the value in the Company field in the Batches (tuxch0104m000) session.
Export module
Company Wait for <CR> with Messages Start of Audit Range Start from last Export Date/Time
Enter the company to be used in the Company field in this session. Select to cause messages to remain on screen until you press Enter. Enter the start date and time of the audit range. Select to have this export start from the time the last export based on audit finished. All transactions between the specified start time and date and the current time and date are exported. This is important if the export procedure is part of a job. Every time the job is started, the end of the audit range will be the current time and date. The length of the interval is therefore not fixed.
Multisite control
With BaanERP you can now use the Exchange module to set up a batch-driven replication server. This enables you to maintain the same data at multiple sites. Data replication can be synchronous or asynchronous. In synchronous replication, data is sent from one system to another as soon as the data changes. Asynchronous replication is batch-driven, that is, it occurs at set time intervals or on demand. In BaanERP, data replication is asynchronous. It is accomplished as follows:
n n
The source system runs an export process. The source system sends a message to the target system or systems notifying them that new data is available. The target system runs an import process to assimilate the new data received from the source system.
In Exchange, a site is defined as an application server on which one or more exchange schemes for exporting or importing data are stored.
Audit trail
Exchange uses your databases audit trail to enable multisite exchange. Before you can begin a multisite exchange process, you must have audit trail set on. You can do this using the Database Definitions (ttaad4510m000) and Table by Database (ttaad4111m000) sessions. Auditing all of your data can consume a large amount of memory. You should therefore specify exactly which tables are to be audited and which are not. Every table containing data that you want to replicate in a multisite exchange scheme must be audited.
Multisite control
Multisite control
Source environment, company, exchange scheme, and batch Run and try number of the export process (required for the sequence order at the target site) Target environment, company, exchange scheme, and batch Separator and enclosing character of the source exchange scheme Whether the ASCII files were compressed after export Batch line and file name (including the directory) for each batch line completed
At the target site, Exchange checks whether an exchange link exists that specifies the source environment, company, exchange scheme, and batch. If so, Exchange stores the information in Batches to Import and Batch Lines to Import.
Multisite control
If there are no batches to import, Exchange does not perform an import. If there is a batch to import, Exchange performs the following functions, and repeats the process for subsequent batches to import:
n n n n
Copies the files from the source site. Removes the run from the batches to import and deletes its batch lines to import. Runs the import. Sends an Import Done to the source site.
The import process takes some time to complete, which means that while Exchange is busy processing one batch to import, new batches to import can arrive. Exchange continues checking for new batches until all the batches have been imported. Exchange usually runs a regular import only when there is no exchange link or when there are one or more batches to import. You can overrule this, however, and initiate an import batch without having Exchange perform these checks.
IMPORTANT NOTE
Each batch to import is processed in order of the run number and the try number within each run. The run number refers to the sequence order of a process within an exchange scheme. The try number is the number of attempts made for each run. If Exchange cannot process one import batch, it stops and does not continue processing subsequent batches. If necessary, you can delete the problematic batch so that Exchange can continue with the subsequent batches.
Source environment, company, exchange scheme, and batch The run number and try number of the export Target environment, company, exchange scheme, and batch
Multisite control
When Exchange receives the Import Done message at the source site, Exchange removes the stored current Export Done message to which the Import Done message refers. When you are ready to clean up the ASCII files, you can check whether all targets that have subscribed to the source have already processed the files. A file must only be deleted when the run and try that created it do not occur in the current Export Done messages.
Environments (tuxch4100m000) Exchange Links (tuxch4501m000) Activate/Deactivate Exchange Links (tuxch4201m000) Resend Rejected Messages (tuxch4203m000) Subscriptions (tuxch4502m000) Receive Remote Procedure Calls (tuxch4200m000)
Environments (tuxch4100m000)
To set up a multisite exchange, you need to define all the source environments and target environments that are used in the multisite exchange. Use the Environments (tuxch4100m000) session to find, list, and maintain sites to be used to exchange data between different sites. Even though this session is especially designed for data exchanges between different sites, you can also use this session if you are using multisite exchange in a single BSE environment. The target environment and source environment are then the same.
Multisite control
Enter the name of the environment. Enter the system on which the environment resides, and the path for the directory of the environment.
Environments (tuxch4100m000) Field Environment System BSE Path Description Enter the name of the environment. Enter the system on which the environment resides. Enter the path for the directory of the environment.
Multisite control
Activate (Ctrl+Shift+A) Activates a single exchange link. Deactivate (Ctrl+Shift+D) Deactivates a single exchange link. Activate/Deactivate Exchange Links Activate or deactivate a range of exchange links. Batches to Import View or delete the batches to import. Rejected Import Done Messages View the Rejected Import Done Messages. Choose FileNew to display the Exchange Links (tuxch4101s000) details session. Enter a name and description for the link that you are creating. Enter the target exchange scheme and batch. Enter the source information. If you want to add more information, click the Text button on the toolbar to start the text editor.
Multisite control
Exchange Links (tuxch4101s000) Field Exchange Link Description Target Exchange Scheme Target Batch Source Environment Source Company Source Exchange Scheme Source Batch Exchange Link Status Exchange Link Text Description Use the Exchange Link field to enter a name for the link that you are creating. Enter a description for this exchange link. Enter the name of the target exchange scheme. Enter the batch number of the target exchange scheme. Enter the source environment. Enter the number of the source company. Enter the name of the source exchange scheme. Enter the batch number in the source exchange scheme. This field is shown as inactive until links at both the target and source sites are set up, and you activate this exchange link. Indicates whether this exchange link includes text.
Multisite control
Under Action Type, choose whether to activate or to deactivate the link. Under Selection Type, choose how to make a selection of links. Define a range of exchange links, or choose the Detailed tab where you can make a more detailed selection.
Multisite control
Multisite control
Activate/Deactivate Exchange Links (tuxch4201m000) Field General tab Action Type Activate Deactivate Select to activate a range of exchange links. Specify the range in Selection by Exchange Link. Select to deactivate a range of exchange links. Specify the range in Selection by Exchange Link. Description
Only Links Having Select to deactivate only the links in the specified range with the status Inactive (Target Only). Status Inactive (Target Only Selection Type Selection by Exchange Link Select to be able to enter a range of links in the Exchange Link field under Selection by Exchange Link.
Detailed Selection Select to be able to make a more detailed selection of exchange links on the Detailed tab. Selection by Exchange Link Exchange Link Detailed tab Detailed Selection Target Exchange Scheme Target Batch Source Environment Source Company Source Exchange Scheme Source Batch Enter a range of target exchange schemes for which you want to activate or deactivate the exchange links. Enter a range of target batches for which you want to activate or deactivate the exchange links. Enter a range of source environments for which you want to activate or deactivate the exchange links. Enter a range of source companies for which you want to activate or deactivate the exchange links. Enter a range of source exchange schemes for which you want to activate or deactivate the exchange links. Enter a range of source batches for which you want to activate or deactivate the exchange links. Enter a range of exchange links. This field is only activated if Selection by Exchange Link is set On.
Multisite control
The target system does not use Baan Exchange. The target system is not operational. Network connections are slow. There is no remote user in the target environment or in the source environment. The Receive Remote Procedure Calls (tuxch4200m000) session did not run in the source environment or target environment.
If a message cannot be delivered to the receiving site, it is stored at the sending site and receives the status rejected. Follow this procedure to resend the rejected message:
1 2 3 4
Select one or more message types in the Messages To Resend group box. This activates the appropriate range tab. Use the check boxes in the Selection Type group box to either make a global or a detailed selection of messages to resend. Define the range on the appropriate range tab. Click Resend to start the process.
After messages are successfully sent, they are removed. This process can also run automatically as part of a job. This means that if you do this regularly, you do not have to check manually for rejected messages.
Multisite control
Figure 39, Resend Rejected Messages, Current Export Done Messages tab
Multisite control
Multisite control
Resend Rejected Messages (tuxch4203m000) Field Selection tab Messages to Resend Current Export Done Messages Import Done Messages Subscription Destroyed Messages Selection Type Global Selection Select to activate the global selections on each tab and see everything for each exchange link or subscription. Select to activate the fields contained on the Current Export Done Messages tab. Select to activate the fields contained on the Import Done Messages tab. Select to activate the fields contained on the Subscription Destroyed Messages tab. Description
Detailed Selection Select to specify the exchange scheme, batch, company, and environment for which to see rejected messages. Current Export Done Messages tab Global Selection Subscription Target Environment Target Company Detailed Selection Source Exchange Scheme Source Batch Target Environment Target Company Target Exchange Scheme Target Batch Global Selection Exchange Link Detailed Selection Target Exchange Scheme Enter a range of target exchange schemes. Enter a range of exchange links. Enter a range of source exchange schemes. Enter a range of source batches. Enter a range of target environments. Enter a range of target companies. Enter a range of target exchange schemes. Enter a range of target batches. Enter a range of subscriptions. Enter a range of target environments. Enter a range of target companies.
Multisite control
Target Batch Source Environment Source Company Source Exchange Scheme Source Batch Global Selection Subscription Target Environment Target Company Detailed Selection Source Exchange Scheme Source Batch Target Environment Target Company Target Exchange Scheme Target Batch
Enter a range of target batches. Enter a range of source environments. Enter a range of source companies. Enter a range of source exchange schemes. Enter a range of source batches.
Subscription Destroyed Messages tab Enter a range of subscription from the source sites. Enter a range of target environments. Enter a range of target companies. Enter a range of source exchange schemes. Enter a range of source batches. Enter a range of target environments. Enter a range of target companies. Enter a range of target exchange schemes. Enter a range of target batches.
Subscriptions (tuxch4502m000)
After you have defined the source environments and target using the Environments (tuxch4100m000) session, you need to define the exchange links and subscriptions so that you can link the target environment and source environment. You can use the Subscriptions (tuxch4502m000) session to view and maintain subscriptions. The subscription at the source site is equivalent to the exchange link at the target site. The codes for both the subscription and the exchange link must be the same. When a subscription is deleted, the source site sends a Subscription Destroyed message to the target site. This deactivates the exchange link.
Multisite control
Current Export Done Messages Allows you to view the Export Done messages. Rejected Subscriptions Destroyed Messages Allows you to view the rejected Subscription Destroyed messages.
Enter a name for the link that you are creating. Enter the source exchange scheme and batch. Enter the target information.
Subscriptions (tuxch4502m000) Field Description Subscription Enter a name for the link that you are creating. Source Exchange Enter the source exchange scheme. Scheme Source Batch Enter the source batch. Target Enter the target environment. Environment Target Company Enter the target company. Target Exchange Enter the target exchange scheme. Scheme Target Batch Enter the target batch.
Multisite control
Click Start Receiving to read the messages. Click Stop Receiving to stop the end reading the messages. Click Clean Up to remove the messages that were not automatically removed after reading the messages.
Receive Remote Procedure Calls (tuxch4200m000) Field Start Receiving Stop Receiving Description Select to begin receiving remote procedure calls. Select to stop receiving remote procedure calls.
Introduction
You can use the Exchange (XCH) module to exchange data between two or more companies in an organization. The Generate Exchange Schemes business object lets you automate the creation of the required master data and import data. Data is exchanged between companies in Baan when you want to export data:
n
From one company and then import the data into one or more companies (dissemination). From multiple companies and then import the data into one company (consolidation).
In the first situation, you execute the export and import procedures sequentially. This is called dissemination because the data is disseminated from a master company to one or more dependent companies. If the data is to be imported into more than one company, you should create a batch for each company. You must also create the corresponding import table and field relations. Refer to the Copy Exchange Scheme (tuxch0201m000) session in the Exchange Miscellaneous Tools module for more information. In the second situation, you also execute the export and import procedures sequentially. This is called consolidation because the data is consolidated from subcompanies to a master company. As in the dissemination strategy, you create multiple batches for the export companies. You create one batch for the import company.
At this time, the only method of exchange for consolidation available is the one shown in Figure 44, Using Exchange to consolidate data across Baan companies.
master company
Import
ASCII files
ASCII files
ASCII files
Export
Export
Export
sub company 1
sub company 2
sub company 3
To set up an exchange between companies, you must identify the master companies and subcompanies. Use the Exchange Companies (tuxch0150m000) session to record master companies. You can split the import and export processes into more manageable groups using the Exchange Groups (tuxch0151m000) session. If the importing company only obtains data from a single exporting company, you can use the Table Details (tuxch0152m000) session to specify the exporting company per table. Then you can use the Field Details (tuxch0153m000) session to specify which fields are maintained locally for each table. You can create import tables and their fields for the exchange group and master company using the Import Tables (tuxch0154m000) and the Import Fields (tuxch0155m000) session. After everything is set up for your exchange scheme, use the Generate Exchange Scheme (tuxch0251m000) session to automatically generate the exchange scheme, ASCII files and their formats, batch lines, and import table and table field data.
Exchange User Guide 6-2
These are the sessions included in the Generate Exchange Scheme module:
n n n n n n n n n
Exchange Companies (tuxch0150m000) Exchange Groups (tuxch0151m000) Table Details (tuxch0152m000) Field Details (tuxch0153m000) Import Tables (tuxch0154m000) Import Fields (tuxch0155m000) Update Field Data per Exchange Group (tuxch0255s000) Generate Exchange Scheme (tuxch0251m000) Generate Authorizations (tuxch0256m000)
Figure 45, Mandatory sessions for setting up an exchange scheme shows the sessions that are mandatory when you set up an exchange scheme using the Generate Exchange Scheme module.
Table Details (tuxch0152m000) Import from different company numbers Field Details (tuxch0153m000)
Subcompany 200
Subcompany 300
Enter the company code and company name of the master company. If data is received from more than one source, select Data from Multiple Sources.
Exchange Companies (tuxch0150m000) Field Company Name Description Enter the name of the master company. Company Number Enter the number of the master company. Data from Multiple Select if the data is received from more than one source. Sources
Exchange Groups (tuxch0151m000) Field Exchange Group Description Text Description Enter the name of the exchange group you want to create. Enter a description of the exchange group. Indicates whether this exchange group includes text.
Update Table Details Starts the Update Table Details (tuxch0250m000) session, which allows you to import a range of tables. This is a convenient way to enter many tables. Generate Reference Tables (Ctrl+Shift+G) Creates the reference tables. Enter all BaanERP tables of the master company. Enter the company number in a BaanERP table that is used to export table details to the master company.
You can also choose Update Table Details on the Specific menu to create a range of tables in this session. Choose Generate Reference Tables on the Specific menu to create the reference tables.
Table Details (tuxch0152m000) Field Baan Table Description Export Company Text Description Enter the names of the Baan tables of the master company involved in the exchange process. Enter a description of the table. Enter the number of the company to which this table is to be exported. Indicates whether this table includes text.
Update Field Details Starts the Update Field Details (tuxch0253s000) session, where you can select a company to overwrite the table fields in the master company.
Enter all BaanERP table fields of the BaanERP table in a master company. Use the check box to specify if this field is a local field in an exporting company. Enter the company number of the export company.
Field Details (tuxch0153m000) Field Baan Field Description Local Field Export Company Text Description Enter the fields for the specified Baan table. Enter a description of the field. Select if this is a local field in an exporting company. Enter the number of the company to which this table is to be exported. Indicates whether this field detail includes text.
Update Table Data per Exchange Group Starts the Update Table Data per Exchange Group (tuxch0254m000) session, which automatically creates a range of tables per exchange groups. Generate sequence numbers and reference tables (Ctrl+Shift+A) Begins generating the sequence numbers and reference tables. Generate reference tables (Ctrl+Shift+G) Begins generating the reference tables.
Specify the exchange group and master company. Define per BaanERP table the sequence number and export company.
Import Tables (tuxch0154m000) Field Baan Table Description Sequence Description Enter the name of the table to be imported. Enter the description. Select to specify the sequence of the tables to be imported. You can only use this if you are importing from a single source (multiple data sources = no). Enter the company from which the data for each table is to be exported. Indicates whether this table includes text.
Update Field Data per Exchange Group Starts the Update Field Data per Exchange Group (tuxch0255m000) session, which allows you to create a range of table fields automatically per exchange group.
Specify the exchange group and master company and BaanERP table. Define the BaanERP table field, sequence number and export company.
Import Fields (tuxch0155m000) Field Baan Field Description Local Field Export Company Text Description If the fields of a table have multiple sources, enter the field names to be imported. Enter a description of the Baan field. Select if the source is a local field in an export company. Enter the number of the export company. Indicates whether this field includes text.
Update Table Data per Exchange Group (tuxch0254s000) Field Exporting Company Options Overwrite Records Select to overwrite the existing table fields. Description Enter the number of the export company.
Enter a range of exchange groups. Enter the number of the master company. Define a character to separate the ASCII file fields. Enter a path to store the programs and files created during this process. Click Generate to start the process.
Generate Exchange Scheme (tuxch0251m000) Field Selection Range Exchange Group Importing Company Details Separator Path for Files Enter the character used to separate variable-length ASCII file fields. Enter the path name of the directory where the programs and files created during the exchange process are to be stored. Enter the exchange group to be generated. Enter the number of the importing company. Description
Use the All Exporting Companies check box to generate authorizations for all exporting companies. If the authorizations have to be created for one or more companies, enter the number of the companies. Enter a valid range of exporting company numbers. Enter the names of the users that are to be authorized.
Exchange User Guide 6-15
2 3
4 5 6
Enter the number of the master company. Define the authorizations for the local and imported fields. Click Generate to start the process.
Generate Authorizations (tuxch0256m000) Field All Exporting Companies Description Select to generate authorizations for all exporting companies. Clear to use the fields under Selection Range to specify the companies for which you want to generate authorizations. Enter the range of exporting companies. Enter the names of the users to be authorized. Enter the code for the master company. The master company is used to import data from subcompanies. The master company is created in the Exchange Companies (tuxch0150m000) session. Authorizations Local Fields Imported Fields Define the user authorizations for the local fields. Define the user authorizations for the imported fields.
Importing Company
Miscellaneous
The sessions in the Miscellaneous business object provide useful utilities and sessions related to the status of the export and import processes performed. The utilities do not belong to a specific procedure but they can be used at any time in the Exchange Module. The functions in the Miscellaneous module are divided into the following groups:
n
Logging The Logging functions let you set up and maintain a log table, so that you can monitor what is happening during the exchange process. Tools The Tools functions allow you to perform administrative activities on exchange schemes, ASCII files, ASCII file fields and relations, Baan fields, definition files, and conditions. You can also view a list of predefined functions and variables. Conversion The Conversion sessions guide you through converting a Baan application from Version 6.1.a to a newer release or version.
Print Log File (tuxch0215m000) Remove Log Files (tuxch0216m000) Log Table (Batch Level) (tuxch0508m000) Log Table (Batch Line Level) (tuxch0509m000) Clear Log Table (tuxch0208m000)
Miscellaneous
Enter the type of exchange. Enter a range of exchange schemes. Enter a range of batches. Enter a range of run numbers. Enter a range of try numbers. Enter a range of table relations. Enter the error type. Enter a range of error codes. Select one of the check boxes to print the error report. You have the option to print either a short description or a complete description of the error message.
10 Use the check box to suppress messages for nonexisting files. 11 Click Print to start the process.
Miscellaneous
Print Log File (tuxch0215m000) Field Selection Range Type of Exchange Enter whether this is a regular or non-regular export or import. Exchange Scheme Batch Run Number Try Number Batch Line Error Type Error Code Print Options Print Short Error Description Select if you want to see an overview of all the errors showing only the first 30 characters of the error message. This option is easy to read but it might not display enough information, for example, referential errors. To make sure that you have a complete error report, select Print Long Error Descriptions. Select to see the entire error description. Select if you do not want to see messages regarding log files that you have already deleted or that no longer exist. Clear if you want to see an error message for each log file in the specified range that no longer exists. Enter the exchange scheme to be logged. Enter the batch number of the exchange scheme. Enter the run number of this batch. Enter the try number of this batch. Enter the batch line. Use this to specify a type of error, if preferred. Enter the error code, if known. Description
Miscellaneous
Define the type of exchange. Enter a range of exchange schemes. Enter a range of batches. Enter a range of run numbers. Enter a range of try numbers. Click Remove to start the process.
Remove Log Files (tuxch0216m000) Field Selection Range Type of Exchange Enter whether the log files of regular or non-regular exports or imports are to be removed. Exchange Scheme Batch Run Number Try Number Enter the exchange scheme whose log file is to be removed. Enter the batch number of the exchange scheme. Enter the run number of this batch. Enter the try number of this batch. Description
Miscellaneous
Log Table (Batch Line Level) Starts the Log Table (Batch Line Level) (tuxch0509m000) session.
Enter the type of exchange, whether its a regular or non-regular import or export. Enter the exchange scheme name and run number. Confirm that the other information is correct.
Miscellaneous
Log Table (Batch Level) (tuxch0508m000) Field Description Type of Exchange Enter whether this is a regular or non-regular export or import. Exchange Scheme Run Number Try Number Batch Sequence Number Processing Type Control Type User Name Company Enter the exchange scheme of the log file. Enter the run number of the batch. Confirm the try number of this batch. Confirm the batch number of this exchange scheme. Confirm the sequence number. Confirm the processing type. Confirm the control type. Confirm the user name. Confirm the company code.
Miscellaneous
Enter whether this is a regular or non-regular export or import. Enter the exchange scheme of the log file. Enter the batch information. For each table relation, Exchange displays the import or export information.
Miscellaneous
Log Table (Batch Line Level) (tuxch0509m000) Field Description Type of Exchange Enter whether this is a regular or non-regular export or import. Exchange Scheme Run Number Try Number Batch Table Relation Sequence Number Baan Table ASCII File Records Read Records Processed Error Rejected Conditions Rejected Records Skipped Batch Line End Date and Time Enter the exchange scheme of the log file. Enter the run number of the batch. Enter the try number of this batch. Enter the batch number of this exchange scheme. Confirm the table relation. Confirm the sequence number. Confirm the Baan table. Confirm the ASCII file. Displays the number of records read. Displays the number of records processed. Displays the number of rows that were not processed due to errors. Displays the number of records having problems with condition scripts. Displays the number of records skipped. Displays the batch line end date and time.
Miscellaneous
Define the type of exchange. Enter a range of exchange schemes. Enter a range of run numbers. Enter a range of batch end dates. Use the check box if you want to clear the log data of the last run. Click Clear to start the process.
Clear Log Table (tuxch0208m000) Field Description Selection Range Type of Exchange Enter whether this is a regular or non-regular export or import. Exchange Enter the exchange scheme of the log table. Scheme Run Number Enter the run number of the batch. Batch End Date Enter the date of the end of this batch. Options Also Clear Last Select to clear the last run as well as the log table. Run
Miscellaneous
Copy Exchange Scheme (tuxch0201m000) Delete Exchange Scheme (tuxch0222m000) Rename ASCII File (tuxch1202m000) Create ASCII File Fields and Relations (tuxch0203m000) Create Definition Files (tuxch0204m000) Print ASCII File (tuxch0202m000) Remove ASCII Files (tuxch2202m000) Check Syntax of Conditions (tuxch0206m000) Predefined Functions/Variables (tuxch0510m000) Print Exception Report for Baan Fields (tuxch0423m000)
Use the check boxes under Attachments how to copy the exchange schemes. Enter the company number to where you want to copy the exchange schemes. Select the exchange schemes, batches and table relations for import or export, depending on the chosen option.
Miscellaneous
Copy Exchange Scheme (tuxch0201m000) Field Copy Description Choose whether you want to copy the complete exchange scheme, batch, or relations. When you copy an exchange scheme, existing target exchange schemes are deleted and overwritten. If the conditions codes or relation codes used in the relations are not already present in the new exchange scheme, the condition code/conversion relation code is initialized as empty. Copy to Company Enter the company number to which you want to copy this Number exchange scheme. The default is the current company number. You can also copy part of the exchange scheme. Selection Exchange Scheme Batch Table Relation (Import) Table Relation (Export) Enter the source and target exchange schemes. If you specified Batch in the Copy field, you can enter the batch name here. If you specified Relations in the Copy field, you can enter the table relation name here. If you specified Relations in the Copy field, you can enter the table relation name here.
Miscellaneous
Use the check boxes under Attachments to specify how to delete the exchange scheme. Select the exchange schemes, batches and table relations for import or export, depending on the chosen option. Click Delete to start the process.
Miscellaneous
Delete Exchange Scheme (tuxch0222m000) Field Delete Selection Range Exchange Scheme Batch Table Relation (Import) Table Relation (Export) Enter a range of exchange schemes. If you specified Batch in the Delete field, you can enter the batch name here. If you specified Relations in the Delete field, you can enter the table relation name here. If you specified Relations in the Delete field, you can enter the table relation name here. Description Choose whether you want to delete the complete exchange scheme, batch, or relations.
Enter the exchange scheme. Enter the old ASCII file code and the new ASCII file code. Click Rename to start the process.
Miscellaneous
Rename ASCII File (tuxch1202m000) Field Exchange Scheme Selection ASCII File Enter the old name of the ASCII file and enter the new name you want it to have. Description Enter the exchange scheme to be renamed.
Miscellaneous
Enter the code of the exchange scheme. Select a range of ASCII files. Use the check boxes to define how to create the ASCII file fields. Use the check boxes to define how to create the Table and Field relations. Click Generate to start the process.
Miscellaneous
Create ASCII File Fields and Relations (tuxch0203m000) Field Exchange Scheme Selection range ASCII File ASCII File Fields Overwrite ASCII File Formats Create from Definition Files Create Based on Table Definitions Create Batch Create Import Relations Create Export Relations Select to overwrite the existing file formats. Select to create the ASCII file from definition files. Select to create the ASCII file based on table definitions. Enter the range of ASCII files for which you want to create file fields and relations. Description Enter the exchange scheme.
Table and Field Relations Select to create a batch. The import and export relations are defined in the batch. Select to create table and field relations for import of data. Select to create table and field relations for export of data.
Overwrite Existing Select to allow this process to overwrite the existing table Relations and field relations.
Miscellaneous
Existing definition files are overwritten. This process can also run as part of a job. Follow this procedure to create definition files:
1 2 3
Enter the code of the exchange scheme. Enter the code of the ASCII files. Click Create to start the process.
Create Definition Files (tuxch0204m000) Field Selection Range Exchange Scheme ASCII File Enter a range of exchange schemes for which you want to create definition files. Enter a range of ASCII files whose structure you want to copy into sequential files. Description
Miscellaneous
Enter the code of the exchange scheme and ASCII file. The physical ASCII file is automatically entered. If you want to print part of the physical ASCII file, enter range field numbers with a valid range of values. Define the field numbers that have to be printed. Click Print to start the process.
Miscellaneous
Print ASCII File (tuxch0202m000) Field Exchange Scheme ASCII File ASCII File Name Selection Range Field Number Print What Field Numbers If you only want to print part of the ASCII file, enter a range of field numbers of the ASCII file. If you only want to print part of the physical ASCII file, enter a range of field numbers. Description Enter the exchange scheme to be printed. Enter the ASCII file within that exchange scheme. Baan automatically enters the ASCII file name.
Define the type of the exchange. Enter a range of exchange schemes. Enter a range of run numbers. Enter a range of try numbers. Enter a range of code of the batches. Enter a range of table relations. Specify a time period between two dates.
Miscellaneous
Remove ASCII Files (tuxch2202m000) Field Exchange Type Exchange Scheme Run Number Try Number Batch Batch Line Date Description Enter whether this is a regular or non-regular export or import. Enter the exchange scheme of the transaction to be checked. Enter the run number of this batch. Enter the try number of the batch. Enter the batch number of this exchange scheme. Enter the line number of this batch. Enter the creation date of the ASCII files to be removed.
Miscellaneous
If an error is reported on a specific condition in this session, but the sessions Create Import Programs (tuxch0227m000) and Create Export Programs (tuxch0228m000) do not report any errors with this condition, the syntax of the condition is correct.
Check Syntax of Conditions (tuxch0206m000) Field Exchange Scheme Selection Range Condition Options Display Errors Select to display the syntax errors. Enter the range of conditions for which you want to check the syntax. Description Enter the name of the exchange scheme.
Miscellaneous
Note that, with the exception of import.company, export.company and startup.company, the variables are implemented as a define, and cannot directly be used in queries. For example, do not write: where tuxch008.runn = :run.number, but write instead: where tuxch008.runn = :1 wherebind (1, run.number) For more information about a particular function or variable, click Help and then click on the name of the individual function or variable. For detailed information about the functions, variables and libraries use the hypertext feature. Select the function/variable/library for which you want to see more information. Functions get.xch.scheme get.batch get.batch.line get.default.dateformat qdb.search read.table read.table.once read.table.company log.mess do.not.log.condition do.not.export.record Variables triton.table triton.field element.no ascii.file ascii.file.name run.number try.number xch.type redo.type cntl.type import.company export.company startup.company no.rec.read no.rec.write no.err.rejects no.cond.rejects no.rec.skip
Miscellaneous
Main Libraries tudllcommon tudlldate-line tudlldate_time tudllfile_path tudlllink_com tudlllink_def tudlllink_file tudlllink_run tudlllogging tudllmultiline tudll_predefine tudllxch2
Miscellaneous
Enter a range of exchange schemes. Enter a range of batches. Enter a range of table relations (import). Click Print to start the process.
Print Exception Report for Baan Fields (tuxch0423m000) Field Selection range Exchange Scheme Batch Table Relation (Import) Enter a range of exchange schemes. Enter a range of batch numbers. Enter a range of table relations to import for which you want to print exception reports. Description
Miscellaneous
Types of conversion
Baan data is stored in database tables. The data dictionary describes the structure of tables, such as fields, field types, lengths, and the sequencing of fields in the database. When you upgrade the Baan environment, new fields can be appended to existing tables and existing fields can have changed attributes. Before you can upgrade the Baan environment, you must convert the data to adhere to this new structure. Depending on release requirements, a conversion can have either a reconfiguration of tables and exchange, or only an exchange. The first type, conversion with a reconfiguration of tables and exchange, occurs when you install an update release in an existing Baan environment. To convert the data, you change the package combination of the company. This procedure reconfigures the tables to meet the new specifications. However, if the new version requires new data, you also need to provide an exchange scheme. The second type, a conversion with exchange only, occurs when you install a new version and a new Baan environment. The conversion procedure must then include steps on both the previous and new versions. In this case, Baan provides exchange schemes for you.
Miscellaneous
The procedure and result for both types of conversion are the same; that is, the data must be converted so that you can use the newest release of Baan.
Procedure
To convert data from the previous version to the new one, Baan delivers exchange schemes with the new Baan version. For the old release, you usually install the exchange schemes using the import program provided in the database tools. You must change the company numbers in the batches of the exchange schemes to export the data for the companies to be converted. You might need to execute some conversion-specific sessions at this time. These sessions prepare the data required in the new release. The data is then exported to ASCII files. As an alternative, you can use the database tool, Create Sequential Dump of Table (ttaad4226m000) session instead of an exchange scheme. The method of exporting data is described in detail in the release-specific conversion procedure. For the new release, you usually install the exchange scheme using the import program provided in the database tools. You must change the company number in the batches of the exchange scheme. You can modify the exchange scheme so that the exports associated with the old release are imported using an exchange scheme.
Exchange schemes
BAAN data
BAAN data
Figure 71, An overview of the conversion procedure, shows the procedure for converting data to a new Baan version.
Miscellaneous
After the exchange schemes are loaded, you use the Batches (tuxch0104m000) session to specify the companies for which the data is to be converted. After you have compiled the export script, you can export the data using the Export Data (tuxch0233m000) session. Baan writes the data in the old Baan version to ASCII files and then you can perform the Baan conversion. This is described in detail in books written about each specific conversion. In the new Baan environment, you follow the same steps, which are shown in Figure 72, The conversion procedure.
Batches (tuxch0104m000)
Miscellaneous
After you have made these modifications, you must reconfigure the existing data based on the old definitions according to the new definitions. If you have changed table or domain definitions, you can use the Exchange module to modify the existing data according to the new customized definitions. The relationships between the modules used for this conversion are shown in Figure 73, The conversion procedure with customization.
Master data
Export
Import
Use the sessions contained in the Master Data module to enter or modify the ASCII file and formats. Use the sessions contained in the Export module to modify the export data. After data is exported, you can apply the domain and table definitions to the new release. You can usually reuse the information for the import in the Master Data module, and only specify the table and field relations in the Import module. Finally you compile the import script, and the actual import starts.
Miscellaneous
Use the check boxes under Attachments to define how to convert the exchange schemes. Enter the log file and separator character under Details. The log file can only be entered if at least one of the Convert Conditions and Replace Conditions are selected. The separator character can only be defined if the Convert Domains and Separators check box are selected. Enter a range of exchange schemes and ASCII files. Click Convert to start the process.
3 4
Domains
Make sure that the domain check on database level is disabled before you convert domains. The conversion of domains in the first run can influence the selection range of successive session runs. The range of exchange schemes or ASCII files may have to be changed on the second run. For example, during a conversion of the domains, exchange scheme Scheme-1 to Scheme-1 will be converted to Scheme_1. The hyphen (-) is an illegal character in the exchange scheme name. It is converted to the underscore character(_). During the conversions of start positions of ASCII files, conditions and so on, the range must therefore be set to: Scheme_1 - Scheme_1. The code of ASCII files might also have been changed.
Miscellaneous
Click Display Log File to view the contents of the log file. More characters and character combinations are illegal for the following domains than for previous versions of Baan Exchange. These illegal characters are replaced by legal characters during the conversion. The following domains are changed in version 6.1 b of the Baan Exchange:
n n
The following fields are affected by these changes. The fields marked with an asterisk (*) are primary key fields. The illegal characters in these fields are replaced by an underscore (_).
n n
cxch: first field in most tables*, 001.mxch casf: 002.casf*, 003.casf*, 011.casf*, 021.casf, 031.casf.
For the fields 001.cxch and 002.casf, Exchange carries out a check on conflicting names. This is necessary to avoid a condition or table relation being moved inadvertently to another exchange scheme. If there is a name conflict, a number is added to the cxch or casf field code. Only a maximum of 11 conflicting names, for example scheme#, scheme_, and scheme+, can be handled.
Separator
The separator character, consisting of the Separator Character field and the Control Character check box, has been moved from the ASCII files table (tuxch002) to the exchange scheme (tuxch001) table. Therefore, if the Control Character and Separator Character fields have been filled in version 6.1 a, it will no longer be correct in version 6.1 b. If Separator is selected, a new separator character is added to each exchange scheme in the range that has no separator character.
Convert Conditions
Because a condition is no longer directly linked to an ASCII file, the condition script does not recognize fields of the ASCII file. You must therefore use parameters. The name of the parameters should be the same for different ASCII files for which the condition is used. To enforce this, a parameter should be the same as the field name of the ASCII file field to which the parameter refers. When converting a condition, the parameters for the new condition will be generated for each variable that is used (but not declared) in the script and is a field of the ASCII file.
Miscellaneous
Parameters are stored in the Parameters by Condition table. The log file lists all converted conditions, remarks, error messages, and warning messages. Error messages will be logged in the log file if:
n n
An error occurred on reading or writing a conditions text. A condition could not be compared to an existing condition to check if the existing condition is the same and could therefore be reused (error caused by to read or write problem). Conflicting update.field.(x) commands occur within one script. The return type of a condition is not correct for all the places where the condition is used. For example, in tuxch022.ccon it is used to return a long, while in tuxch032.ccon it is used to return an enumerate. In the condition, a return statement is missing. The syntax of a condition could not be checked. The directory for source object could not be created or source file could not be written. A converted condition contains syntax errors.
n n
n n
A unique name had to be generated for the condition. The old conditions code could not be used because of name conflicts. A condition is used in tuxch022.ccon to fill a BaanERP date field. The date format might be changed in Baan Exchange version 6.1 b. A condition with a correct syntax results in the following warning message Statement not reached on compiling.
A condition could be reused. An already existing condition could be used to replace another condition if the conditions are equivalent.
Problems concerning help texts of conditions. Problems on writing the log file.
For most subfunctions of convert.conditions(), the log file must be open for writing and function log.file.init() must have been called. After calling the convert.conditions() function, the program should call the remove.tmp.include.file(). This is because a temp.include file is used for compiling the converted conditions.
Miscellaneous
Reuse can be limited if different conditions in ASCII files have the same name. For example, if the condition C1 is used in ASCII files A1, A2, and A3, and another condition, also called C1, is used in ASCII files A4, A5, and A6, the last one will not be reused. The conditions will be converted to four new conditions (C1, A4.C1, A5.C1, A6.C1), instead of two new conditions.
Replace Conditions
The following tables and fields will be updated:
n n n
Table Relations (Import) (fields econ, acon, ocon, ucon, dcon, scon). Field Relations (Import) (fields ccon, rval, uval). Field Relations (Export) (field ccon).
The fields of these tables, which previously contained old conditions, refer now to the new conditions. In Baan Exchange version 6.1 b, two additional update conditions are added. The relevant fields are copied from the already existing overwrite conditions. Four fields are copied:
n n n n
Overwrite Record? is copied to Update Record Overwrite Condition is copied to Update Condition Overwrite field is copied to Update Field Overwrite Condition is copied to Update Condition
List all replacements in the log file except overwrite conditions that are copied to update conditions. An error is logged if no new condition could be found to correspond an old condition in the converted conditions table (tuxch017). For most subfunctions of replace.conditions.where.used(), the log file must be open for writing and function log.file.init() must have been called.
Log file
Error messages are logged if:
n n n n n n n
Errors occur during the reading or writing of condition texts. A condition cannot be compared to an already existing condition, to make sure that the condition codes are not identical. The return value of a condition is not true for all places where the condition is used. A return statement is missing in the condition script. The syntax of a condition can be checked. Converted conditions contain syntax errors. A condition cannot be replaced because it is not converted.
Miscellaneous
A unique code is generated for a new condition to avoid code conflicts. A condition is used in tuxch022.ccon to fill a triton date field.
A remark is logged if an existing condition can be used to replace another equivalent condition.
Miscellaneous
Convert Exchange Schemes from 6.1a (tuxch9211m000) Field Options Convert Domains and Separators Control Character The first time you run a conversion, select only this option and clear the others. This converts the domains and sets the separators. Select to add a new control character to each exchange scheme in the specified range that has no separator, and therefore no control character. Select to reset the start positions of ASCII file fields. In versions before the 6.1 b ASCII file, the fields could start at position 1 or 2. In version 6.1 b, they always start at position 1. If the start positions of a range of ASCII files are converted, the ASCII File Fields table will be updated for the ASCII files in the specified range. If the start positions are reset, the lowest start position for each ASCII file will be equal to 1. Select to replace existing conditions in the old version with conditions in the new version. In version 6.1.a, conditions were stored by ASCII file and had to be duplicated to be used by more than one ASCII file. In newer versions this is not necessary because conditions are no longer stored by ASCII file. Conditions were defined by cxch/casf/ccon in Baan Exchange version 6.1 a, but are defined by cxch/ccon in Baan Exchange version 6.1 b. Redo Converted Conditions Replace Conditions Select to convert the conditions again when you repeat the process. The new condition is deleted and the old condition is converted again. Select to replace old conditions that were used in the first conversion. Replacements are put in the log file, except overwrite conditions that update conditions. An error will be logged if, for an old condition, a new condition could not be found in the converted conditions table (tuxch017). Description
Convert Conditions
Miscellaneous
Select to remove old conditions that were successfully converted and replaced. This option also deletes the conditions from the temporary Converted Conditions table. From the old Converted Conditions table, only the conditions that are in the conversion table will be deleted. Therefore, if a condition has not been converted at all, for example because a log file could not be opened, the old condition will not be deleted. However, if the condition has been converted, it will be deleted even if the new conditions contain syntax or other errors.
Details Logfile Separator Selection Range Exchange Scheme ASCII File Enter a range of exchange schemes. Enter a range of ASCII files. Enter the name of the logfile to which error messages are written. Enter the separator character to be used in every exchange scheme that does not have a separator character.
Miscellaneous
Conditions from 6.1a (tuxch0511m000) Field Exchange Scheme ASCII File Condition Description Type Script Syntax OK Description Enter the name of the exchange scheme. Enter the name of the ASCII file. Confirm the old condition. Displays the description of the condition. Displays the type of condition. Indicates whether the condition includes a script. Indicates whether the syntax of the condition was acceptable.
Baan has developed a Generic Exchange Scheme that you can use to install standard exchange schemes delivered by Baan or Baan partners. You can also use it to copy customer specific exchange schemes to other companies or systems, for example, in a multisite environment. The Generic Exchange Scheme contains two batches:
n n
You must complete the following steps before you can use the Generic Exchange Scheme:
n n n
Install the Generic Exchange Scheme Customize the Generic Exchange Scheme Generate the exchange programs and run the Generic Exchange Scheme.
Choose Baan ToolsDatabase ManagementDatabase Utilities, and start the Create Table from Sequential Dump (ttaad4227m000) session. On the Details tab, define the company where you want to store and run the exchange scheme. This can be either your current company or another company in which you want to use the interface. Also on the Details tab, select the following options: Create Tables for Different Company Append f if Table Exists Ignore Referential Integrity Checks
On the Files tab, select Sequential File has Fixed Record Length. On this tab you also define: %PBO()$BSE/lib/exchange%PBO() directory in the Directory for Searching Table Files field.
Use the Exchange Schemes (tuxch0501m000) session to make sure you do not already have an exchange scheme called generic in the specified company, because that is the name of the Generic Exchange Scheme that will be created. If you already have an exchange scheme generic you can rename it using the Copy Exchange Scheme (tuxch0201m000) session. Delete the old generic scheme using the Delete Exchange Scheme (tuxch0222m000) session.
4
Click the Create button to install the Generic Exchange Scheme. This adds the exchange scheme generic to your database. Next Baan prompts you to run the Reorganize Tables (ttaad4225m000) session. The field details that you need to give for this session are displayed below. Note: the company range should be the same as the one selected for the previous session.
Click the Reorganize button to start the process, and then Exit the sessions. The installation is complete, but before you can use it you must adapt the Generic Exchange Scheme to your environment and create the export/import program.
Run the Batches (tuxch0104m000) session in the Exchange module. The field details are displayed in Figure 76, Batches, using the Generic Exchange Scheme. Change the field Company to your current working company or to any other company you want to use.
The Generic Exchange Scheme is the same as any other exchange scheme, so you can adapt it to your needs. Using the details session of Exchange Schemes (tuxch0501m000), you can specify the locations of exchange schemes, log files, and so on.
The Generic Exchange Scheme is just like any other exchange scheme. Refer to the online Help topics of Exchange for more information on adapting and using exchange schemes.