REMOVE JAR (Remove JAR file)

Function

REMOVE JAR removes a JAR file from the HiRDB server. The file is removed from the JAR file storage directory associated with the authorization identifier that is connected.

Format

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

Operands

Specifies the name of the JAR file that is to be removed. The JAR file cannot be specified with an absolute or relative path name.

:embedded-variable
Specifies a VARCHAR-type embedded variable that contains the name of the JAR file that is to be removed as its value.
Character sets other than the default character set cannot be specified.
'character-string'
Specifies as a character string literal the name of the JAR file that is to be removed.

Common rules

  1. You must be connected to the HiRDB server to execute REMOVE JAR.
  2. Any error code is returned to SQLCODE.
  3. A JAR file at a different server machine cannot be specified.
  4. Wildcards cannot be used.
  5. REMOVE JAR should be executed before any transaction is started.

Example

Remove the JAR file named sampleproc.jar by setting its name in 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.jar") ;
filename.len = strlen(filename.str) ;
EXEC SQL REMOVE JAR :filename ;