# 6.7.25 SHOW USERBLOCK

Part of: [6 Language](6-language.md) › [6.7 Data Introspection Language (DIL)](6-7-data-introspection-language-dil.md)

### 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](6-2-processing.md) 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](6-3-2-into.md) for additional information). If not specified, the cursor in use is populated with the result set instead (please refer to the chapter [CURSOR](4-cursor.md) for additional information).

### Return

The user-defined block of data stored within an HDF5 file as an [HDFQL_OPAQUE](5-1-constants.md#hdfql_opaque) or nothing (in case the file does not have a user-defined block of data).

### Example(s)

```hdfql
# 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
```
