dataspace_id, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT, HDF5Constants.H5P_DEFAULT);
 
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Copyright by The HDF Group.                                               *
 * Copyright by the Board of Trustees of the University of Illinois.         *
 * All rights reserved.                                                      *
 *                                                                           *
 * This file is part of HDF5.  The full HDF5 copyright notice, including     *
 * terms governing use, modification, and redistribution, is contained in    *
 * the files COPYING and Copyright.html.  COPYING can be found at the root   *
 * of the source code distribution tree; Copyright.html can be found at the  *
 * root level of an installed copy of the electronic HDF5 document set and   *
 * is linked from the top-level documents page.  It can also be found at     *
 * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
 * access to either file, you may request a copy from help@hdfgroup.org.     *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/************************************************************
    Create two datasets within groups.
 ************************************************************/
package examples.intro;
import hdf.hdf5lib.H5;
import hdf.hdf5lib.HDF5Constants;
public class H5_CreateGroupDataset {
    private static String FILENAME = "H5_CreateGroupDataset.h5";
    private static String GROUPNAME = "MyGroup";
    private static String GROUPNAME_A = "GroupA";
    private static String DATASETNAME1 = "dset1";
    private static String DATASETNAME2 = "dset2";
    private static final int DIM1_X = 3;
    private static final int DIM1_Y = 3;
    private static final int DIM2_X = 2;
    private static final int DIM2_Y = 10;
    private static void h5_crtgrpd() {
        long file_id = -1;
        long dataspace_id = -1;
        long dataset_id = -1;
        long group_id = -1;
        long group1_id = -1;
        long group2_id = -1;
        int[][] dset1_data = new int[DIM1_X][DIM1_Y];
        int[][] dset2_data = new int[DIM2_X][DIM2_Y];
        long[] dims1 = { DIM1_X, DIM1_Y };
        long[] dims2 = { DIM2_X, DIM2_Y };
        // Initialize the first dataset.
        for (int indx = 0; indx < DIM1_X; indx++)
            for (int jndx = 0; jndx < DIM1_Y; jndx++)
                dset1_data[indx][jndx] = jndx + 1;