HDFql Reference Manual v2.6.0

6.7.3SHOW USE FILE

Syntax

SHOW USE FILE [file_name]

[post_processing_option]

[output_redirecting_option]

Description

Show (i.e. get) the HDF5 file currently in use or check if a certain HDF5 file is used (i.e. opened). If file_name is not used an error is raised.

Parameter(s)

file_name – optional string that specifies the name of the HDF5 file to check if it is used (i.e. opened). If file_name is specified, file_name is checked among all files that are being used. If not specified, the name of the (HDF5) file currently in use is returned.

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 HDF5 file currently in use or the HDF5 file being checked if it is used as an HDFQL_VARCHAR, or nothing (in case no file is in use).

Example(s)

# show (i.e. get) HDF5 file currently in use (i.e. open) (should return nothing) 
SHOW USE FILE

# use (i.e. open) four HDF5 files named "my_file0.h5", "my_file1.h5", "my_file2.h5", and "my_file3.h5"
USE FILE my_file0.h5, my_file1.h5, my_file2.h5, my_file3.h5

# show (i.e. get) HDF5 file currently in use (i.e. open) (should return "my_file3.h5") 
SHOW USE FILE

# check if a file named "my_file1.h5" is used (i.e. opened) (should return "my_file1.h5" (i.e. it is used (i.e. opened)))
SHOW USE FILE my_file1.h5

# close HDF5 file currently in use (i.e. file "my_file3.h5") 
CLOSE FILE 

# show (i.e. get) HDF5 file currently in use (i.e. open) (should return my_"file2.h5") 
SHOW USE FILE

# close HDF5 file "my_file1.h5" 
CLOSE FILE my_file1.h5

# show (i.e. get) HDF5 file currently in use (i.e. open) (should return "my_file2.h5") 
SHOW USE FILE

# close HDF5 file currently in use (i.e. file "my_file2.h5") 
CLOSE FILE 

# show (i.e. get) HDF5 file currently in use (i.e. open) (should return "my_file0.h5") 
SHOW USE FILE 

# close HDF5 file currently in use (i.e. file "my_file0.h5") 
CLOSE FILE 

# show (i.e. get) HDF5 file currently in use (i.e. open) (should return nothing) 
SHOW USE FILE