REMOVE CLIB (Remove external C library file)

Function

REMOVE CLIB removes an external C library file used to implement an external C stored routine that has been installed on a HiRDB server.

Format

REMOVE CLIB {:embedded-variable|'character-string'}

Operands

Specifies the name of the external C library file to remove. Specify only the file name, without a directory path.

:embedded-variable
Specifies the name of the external C library file as a VARCHAR type embedded variable.
Character sets other than the default character set cannot be specified.
'character-string'
Specifies the name of the external C library file as character string literal.

Common rules

  1. Before executing REMOVE CLIB, the computer you are using must be connected to a HiRDB server.
  2. Error codes are returned in SQLCODE.
  3. Wildcards cannot be used.
  4. REMOVE CLIB must be executed before the start of a transaction.
  5. A C library file cannot be removed during execution of a transaction.

Example

Specify and remove an external C library file (sampleproc.dll) using an embedded variable.

EXEC SQL BEGIN DECLARE SECTION ;
struct {
   short  len ;
   char   str[256] ;
} filename ;
EXEC SQL END DECLARE SECTION ;
EXEC SQL CONNECT ;
strcpy(filename.str,"sampleproc.dll") ;
filename.len = strlen(filename.str) ;
EXEC SQL REMOVE CLIB:filename ;