DECLARE 
  w_collection ASI.TEST_TYPES;
  w_object ASI.TEST_TYPE;  
  w_dataset ASI.TEST_COLLECTION.DATASET;
  i BINARY_INTEGER; 
BEGIN  
  /* collection of ASI.TEST_TYPE */ 
  w_collection := ASI.TEST_COLLECTION.GET_COLLECTION;
  dbms_output.put_line('collection count '||w_collection.COUNT);

  dbms_output.put_line('-----> loop on collection');
  FOR i IN 1..w_collection.COUNT 
  LOOP
    dbms_output.put_line('object['||i||']:'||w_collection(i).ATTRIBUT1);
  END LOOP;  

  /* transformation into DATASET */
  w_dataset := ASI.TEST_COLLECTION.GET_COLLECTION_TO_DATASET_1(w_collection);
     
  dbms_output.put_line('-----> loop on dataset objects');  
  LOOP  
    FETCH w_dataset INTO w_object;
        EXIT WHEN w_dataset%NOTFOUND;
        dbms_output.put_line(w_object.ATTRIBUT1);        
    END LOOP;  

  COMMIT; 
END;
