Perl Objects in SQL Procedures and Functions

When defining SQL procedures and functions referencing Perl objects, the LANGUAGE is always PERL and the EXTERNAL NAME string contains the information needed to call the Perl subroutines and to return OUT parameters and return values.

In this example, the Perl object PerlConsoleExample creates the string 'Hello world'. This SQL procedure writes the output of PerlConsoleExample to the database server messages window:

CREATE PROCEDURE PerlWriteToConsole( IN str LONG VARCHAR) 
  EXTERNAL NAME '<file=PerlConsoleExample> 
    WriteToServerConsole( $sa_perl_arg0 )'
  LANGUAGE PERL;

// 'Hello world' should appear in the database server messages window
CALL PerlWriteToConsole( 'Hello world' ); 
Related tasks
Creating a Perl Object
Installing a Perl Object into an SAP Sybase IQ Database
Updating a Perl Object
Deleting a Perl Object
Viewing or Modifying Perl Object Properties.
Testing the Configuration of a Perl External Environment
Viewing or Modifying Perl External Environment Properties
Related reference
Perl External Environment Privilege Summary