CREATE OR REPLACE PACKAGE mip_systemcall IS

  -- Author  : HARDYA
  -- Created : 05/02/2008 09:46:18
  -- Purpose : Provide access to OS system calls
  -- $Id:$

  /** Execute OS command
  %param p_cmd_str the OS command to be executed
  %return exit code from the OS command
  */
  FUNCTION syscall(p_cmd_str IN VARCHAR2) RETURN BINARY_INTEGER;

  /** Execute OS command
  %param p_cmd_str the OS command to be executed
  */
  PROCEDURE syscall(p_cmd_str IN VARCHAR2);

END mip_systemcall;
/
CREATE OR REPLACE PACKAGE BODY mip_systemcall IS

  -- $Id:$

  FUNCTION syscall(p_cmd_str IN VARCHAR2) RETURN BINARY_INTEGER AS
    LANGUAGE c NAME "system"
    LIBRARY systemcall
    PARAMETERS(p_cmd_str STRING);

  PROCEDURE syscall(p_cmd_str IN VARCHAR2) IS
    l_dummy BINARY_INTEGER;
  BEGIN
    l_dummy := syscall(p_cmd_str);
  END syscall;

BEGIN
  -- Initialization
  NULL;
END mip_systemcall;
/
