HDFql Reference Manual v2.6.0

6.7.25SHOW USERBLOCK

Syntax

SHOW USERBLOCK [file_name]

[post_processing_option]

[output_redirecting_option]

Description

Show (i.e. get) the user-defined block of data stored within an HDF5 file named file_name or within the HDF5 file currently in use.

Parameter(s)

file_name – optional string that specifies the name of the HDF5 file whose user-defined block of data is to be obtained. If file_name is specified, the file is opened on the fly, the user-defined block of data is obtained, and the file is subsequently closed. If not specified, the file currently in use is used instead.

post_processing_option – optional option that transforms the result set according to the programmer’s needs, such as ordering or truncating (please refer to the section PROCESSING for additional information).

output_redirecting_option – optional option that specifies the cursor in use, an HDF5 object (i.e. dataset or attribute), a (text, binary, or Excel) file, or memory (i.e. user-defined variable) to write the result set into (please refer to the subsection INTO for additional information). If not specified, the cursor in use is populated with the result set instead (please refer to the chapter CURSOR for additional information).

Return

The user-defined block of data stored within an HDF5 file as an HDFQL_OPAQUE or nothing (in case the file does not have a user-defined block of data).

Example(s)

# create an HDF5 file named "my_file0.h5" with no user-defined block of data 
CREATE FILE my_file0.h5

# show (i.e. get) user-defined block of data stored within file "my_file0.h5" (should return nothing)
SHOW USERBLOCK my_file0.h5

# create an HDF5 file named "my_file1.h5" with a user-defined block of data (size 512) storing values 50, 60, and 70
CREATE FILE my_file1.h5 USERBLOCK SIZE 512 VALUES(50, 60, 70)

# show (i.e. get) user-defined block of data stored within file "my_file1.h5" (should return 50, 60, 70, 0, 0, 0, 0, ...)
SHOW USERBLOCK my_file1.h5

# create an HDF5 file named "my_file2.h5" with a user-defined block of data (size 8192) storing values from a binary file named "my_file.pdf"
CREATE FILE my_file2.h5 USERBLOCK SIZE 8192 VALUES FROM BINARY FILE my_file.pdf

# use (i.e. open) HDF5 file "my_file2.h5" 
USE FILE my_file2.h5

# show (i.e. get) user-defined block of data stored within the file currently in use (should return the values (i.e. content) of file "my_file.pdf")
SHOW USERBLOCK