Entering content frame

 Call with the Perl Interface of the Loader 

You can call the Loader by processing a Perl script.

Prerequisites

Perl is installed on the host.

The following Perl modules are delivered with the Loader program, and allow you to create Perl scripts that can be processed by the Loader:

·         Windows: loaderaperl.dll, loader.pm, instperl.pl

·         UNIX: loadercperl.so, loader.pm, instperl.pl

·         HP : loadercperl.sl, loader.pm, instperl.pl

Open the instperl.pl file. When you do this, the files are copied to the relevant directories.

Call

perl <perl_script_file> [<argument> ...]

You have the option of specifying arguments <argument>.

Frequently used arguments:

<user_name>
<password>

User name (Database User)
Password
The database system automatically converts the user name and password into uppercase letters.

<database_name>

Name of the database instance

<data_path>

Directory in which the data file is stored

<server_node>

Name of the server on which the Loader is located

perl sample samplename secret TST C:\data\sapdb

The Perl script sample is called. The logon to the Loader is performed for the user samplenameon the database instance TST. The data file is in the directory C:\data\sapdb.

Template for Background Files

The following section contains examples of background files in Perl. Their equivalents in the Python script language are also provided for comparison.

Example 1
Build a Perl module with reference to the Perl Libraries,
parse the call arguments


Perl


Python

Example. 2
Set up a database session with the Loader
Log on to the database instance,
Log off



Perl



Python

Example no. 3
Start a database session
Log on to the database instance
Query error code to determine whether table exists
Create a table without querying the error code
Log off



Perl



Python

Example no. 4
Start a database session
Log on to the database instance
Create a table and query the error code
Load data into the table using commands and query the error code
Log off




Perl




Python

Example no. 5
Start a database session
Log on to the database instance
Load data to the table using commands and intercept exceptions
Log off



Perl



Python

Perl Classes

 

Leaving content frame