CREATE OR REPLACE PROCEDURE make_member
  (the_org IN VARCHAR2, the_country IN VARCHAR2,
     the_type IN VARCHAR2) IS
   n NUMBER;
   c Organization_Type;
BEGIN
  SELECT COUNT(*) INTO n
  FROM Organization_ObjTab
  WHERE Abbrev = the_org;
  IF n = 0
   THEN  INSERT INTO Organization_ObjTab
         VALUES(Organization_Type(NULL, the_org,
                  Member_List_Type(), NULL, NULL));
  END IF;
  SELECT VALUE(org) INTO c
  FROM Organization_ObjTab org
  WHERE Abbrev = the_org;
  IF c.is_member(the_country)='no' THEN
     c.add_member(the_country, the_type);
  END IF;
END;
/
