DataLoad
Overview
Creating Scripts
Event Handlers
How to...?
PHP Functions
Oracle Library
Character Encoding

User Guide Home
DataLoad Home

Scripting Overview

PHP has been chosen as the DataLoad script language because it is easy to use, widely supported and has a very wide selection of functions and libraries. For those new to PHP there is significant information available at http://www.php.net. The PHP help manual, containing documentation covering the PHP language and libraries, is supplied with DataLoad and can be opened via a link on the DataLoad Help menu. A link is also provided on that menu to online documentation on the PHP web site.

PHP is tightly integrated with DataLoad and when a PHP script is used it runs whenever the DataLoad file is opened and keeps running in the background until the file is closed. DataLoad provides a number of PHP "events handlers", which are run whenever certain things happen in DataLoad. These events include the DataLoad file being opened and the load starting. The user inserts their PHP code in the event handlers, thus there is no requirement to create entire PHP scripts and instead the required PHP code is inserted in the appropriate handler(s). These event handlers and the PHP code are managed and edited from within DataLoad but are invisible to the user during normal usage. DataLoad Scripting includes a range of PHP functions that are used in the script to control and query DataLoad, for example to get or set spreadsheet data.

The PHP code added to the event handlers may add simple extensions to the Macro or Forms Playback loads or may be the basis for the load itself. In the latter case DataLoad does not load data using a Macro or Forms Playback load and instead it is the PHP script which performs the load. Given the wide range of PHP functions and libraries available, this means DataLoad's scripting may be used to perform complex loads directly in to databases, including Oracle, SQL Server and DB2, as well as retrieving and transforming data.

Most DataLoad users work with Oracle E-Business Suite. DataLoad Scripting includes a PHP library to simplify connecting to and using Oracle databases. While the standard PHP OCI8 functions can be used, and may be appropriate for more advanced loads, the DataLoad library has been designed with ease of use in mind. Also included are the necessary Oracle Instant Client files and these enable connectivity to Oracle databases without any further configuration.