Other functions
To obtain the software (library) version, use the following Heclib functions:
Heclib:
public static int getLibraryMajorVersion(); // Returns 6 or 7 (library, not file version)
// Valid characters are A-Z, a-z A == 1, B == 2, a == 27, b == 28
// For example DSS Version "7-BG", libraryVersion = 70207
public static int getLibraryVersion()
To determine other global parameters use the function "zquery". To determine information about a specific file or record, use the function "zinqir". To set paramters, use the function "zset".
HecDataManager:
public static int zquery(String parameter, stringContainer alpha);
public int zinqir (String parameter)
public void zinqir(String parameter, stringContainer alpha, int number[])
public void zset(String parameter, String alpha, int number)
For zquery, valid parameters are:
Parameter | Returns | Returns in stringContainer |
" mlev " | The current message level (0-15) | Nothing |
" muni " | The message (Fortran) unit | T Nothing |
"vers" | The primary software version (7) | The charater string for the software version. For example "7-AB" |
" date " | 7 | The software (library) version date |
" erro " | The last error code encountered, or 0 if no errors | The error message |
For zinqir, valid parameters are:
Parameter | Returns | Returns in stringContainer |
"erro" | The last error code, or zero if none | The last error message |
"fver" | The 5 digit version number for the file. For example, 7-AB would be 70102 | The charater string for the file version. For example "7-AB" |
"vers" | The primary software version (7) | The charater string for the software version. For example "7-AB" |
"name" | zero | The DSS file name |
"read" | "1" if the file is in read-only mode, "0" if the file is in read and write mode | "ON" if read-only, "OFF if read/write |
"rver" | The version (number of writes) for the last record accessed | Nothing |
"type" | The numeric data type for the last record accessed (e.g., 100 for regular interval time series) | The 3-character string representing the last record data type (e.g., "RTS" for regular interval time series) |
"prog" | Nothing | The name of the program that wrote the last record accessed (if set) |
For zset, valid parameters are:
Parameter | Alpha | int number | Action |
mlvl | ignored | 0-15 | Set global message level, with 2 terse, 4 normal, > 6 debug levels. For compatibility only, use function zsetMessageLevel instead |
munit | ignored | Fortran unit | Sets the Fortran unit number to write messages to. File must be opened prior to calling. |
mhandle | ignored | C Handle | Sets the C handle number to write messages to. File must be opened prior to calling. |
program | Program name | ignored | Sets the name of the program writing data to the file. For informational purposes only. |
maxpath | ignored | any | Sets the expected maximum number of pathnames for the next new file to be created to correctly size tables. |
collection | ignored | ignored | Cause the next new file to be created to be sized for collections. A collection set uses the same hash code for all records in the set, so that the collection can be quickly traversed. |
empty | ignored | 1 | When the file is copied, this causes empty time series records (all missing data) to be copied also. Normally empty records are not copied |
To send a message to the DSS log call zmessage.
HecDataManager:
public void zmessage(String message)
For example:
HecDataManager m = new HecDataManager();
m.zmessage("Hi from Java");