Class Heclib

java.lang.Object
hec.heclib.util.Heclib
All Implemented Interfaces:
Serializable

public class Heclib extends Object implements Serializable
Provides Java interface to native (C/Fortran) HEC-DSS library routines.

The following methods all use 4-character parameters to set or retrieve global settings or current-file settings. None of the methods supports the entire parameter list, and sometimes multiple methods use the same parameter to mean different things.

The following table compares the parameter usage of the methods.

zset() zsetfi() zquery() zinqir() zinquire()
Parameter Version Description Parameter Version Description Parameter Version Description Parameter Version Description Parameter Version Description
ABOR 6 Sets whether library will abort on fatal error ABOR 6 Reports whether library will abort on fatal error ABOR 6 Reports whether library will abort on fatal error
ALLV 6 or 7 Sets the default version for new DSS files opened ALLV 6 or 7 Reports the default version for new DSS files opened
CAAL 7 Reports the number of catalog sort records added since last sort
CALL 7 Reports the catalog sort list length
CAST 6 Sets whether to show status when generating catalog
CATS 7 Reports the catalog sort list status
CCDA 6 Sets whether to exclude missing periods from condensed catalogs
CLEA 7 Clears error number and message CLEA 6 Sets error state (use "" and 0 to clear). Use ERRO and STAT to retrieve
COLL 7 Sets whether to expect collection records in new file COLL 6 Reports whether the file contains collection records COLL 6 or 7
  • DSS 6 - reports whether the file contains collection records
  • DSS 7 - reports the number of collection records in the file
COMP 6 Sets whether to compress time series records when copying or squeezing
CPDD 6 Reports and possibly fixes corrupted paired data records
CURR 6 or 7 Sets the current item number of an in-progress multi-item operation CURR 6 or 7 Reports the current item number of an in-progress multi-item operation CURR 7 Reports the current item number in an in-progress multi-item operation
DATE 7 Reports the library version date
DCDB 6 Sets whether data compression debug is turned on
DEAD 6 Reports percentage of file that is dead space DEAD 6 or 7 Reports percentage of file that is dead space
DELE 6 Reports number of deleted records in file DELE 6 or 7 Reports number of deleted records in file
DETU 7 Detune file for testing purposes
DSIZ 7 Reports the dead space size in words
DSSV 6 or 7 Sets the version for the next new DSS file opened DSSV 6 or 7 Reports the version for next new DSS file opened
EMPT 6 or 7 Sets whether a squeeze of file copy will copy empty records EMPT 6 or 7 Reports whether a squeeze of file copy will copy empty records
ERRO 6 or 7 Reports the current error status ERRO 6 or 7 Reports the current error status ERRO 6 or 7 Reports the current error status
EXPA 7 Reports the number of expansions
FDAT 6 Sets the file creation date (for squeeze only) FDAT 6 Reports the file creation date
FLAG or QUAL 6 Sets whether to write quality flags FLAG or QUAL 6 Reports whether last record read contained quality flags
FMUL 6 Force multi-user access
FSIZ 6 Reports the file size in words FSIZ 6 or 7 Reports the file size in words
FTIM 7 Reports the last written time of the file in epoch milliseconds
FVER 6 or 7 Reports the version of the DSS file FVER 6 or 7 Reports the version of the DSS file
HAND 6 Sets whether to display the file handle rather than the unit number HAND or UNIT 6 or 7
  • DSS 6 - reports the Fortran unit number or file handle of DSS File (see "HAND" parameter in zset(String, String, int))
  • DSS 7 - Reports the file handle of DSS file
HSIZ 6 Sets the size of the hash table for squeezing the DSS file HSIZ 6 Reports the size of the hash table
INTE 6 or 7 Sets whether an in-progress multi-item operation is marked as interrupted INTE 7 Reports whether an in-progress multi-item operation has been marked as interrupted
LWDA 6 Reports the last written date of DSS file
LWTI 6 Reports the last written time of DSS file
MAPU 6 Sets the Fortran unit number to write the catalog map to
MAXA 7 Reports the length of the longest A part
MAXB 7 Reports the length of the longest B part
MAXC 7 Reports the length of the longest C part
MAXD 7 Reports the length of the longest D part
MAXE 6 or 7 Sets the maximum number errors allowed for an multi-item operation MAXE 6 or 7 Reports the maximum number errors allowed for an in-progress multi-item operation MAXE 7 Reports the length of the longest E part
MAXF 7 Reports the length of the longest F part
MAXP 7 Sets the maximum number of pathnames expected MAXP 7 Sets the maximum number of pathnames expected MAXP 7 Reports the maximum number of pathnames expected
MFLU 7 Flushes the message output buffer
MHAN 7 Sets the message output handle MHAN 7 Sets the message output handle MHAN 7 Reports the message output handle
MLVL, MLEV, or MESS 6 or 7 Sets the global message level. MESS is DSS 7 only MLVL or MLEV 7 Sets the global message level. MLVL or MLEV 6 or 7 Reports the global message level MLVL or MLEV 6 Reports the global message level MLVL or MLEV 6 or 7 Reports the global message level
MTIM 7 Reports the last time this process wrote to the file in epoch milliseconds
MULT 6 Sets the current DSS file into multi user mode MULT or ACCE 6 or 7 Sets file access mode. ACCE is DSS7 only MULT 6 Reports Whether the DSS file is in multi user mode MULT 6 or 7 Reports whether the DSS file is in multi user mode
MUNI or MLFN 6 or 7 Sets the Fortran unit number of message output. MLFN is DSS 6 only MUNI 7 Sets the Fortran unit number of message output. MUNI or MLFN 6 or 7 Reports Fortran unit number of message output. MLFN is DSS 6 only. MUNI or MLFN 6 Reports Fortran unit number of message output MUNI 6 or 7 Reports Fortran unit number of message output
NALI 7 Reports the number of alias records in the DSS file
NAME 6 or 7 Reports the name of the DSS file
NDAT 7 Sets logical number of data elements to set in info area NDAT 7 Reports the logical number of data elements to store in the info area
NERR 6 or 7 Sets the number errors encountered in an in-progress multi-item operation NERR 6 or 7 Reports the number errors encountered in an in-progress multi-item operation NERR 7 Reports the number errors encountered in an in-progress multi-item operation
NOTH 7 Reports the number of other processes accessing the file
NPRI 7 Reports the number of primary (non-alias) records in the DSS file
NREC 6 Reports the number of records in the DSS file NREC 6 or 7 Reports the total number of records (primary and alias) in the DSS file
OTHE 7 Reports whether other processes are accessing the file
POIN 6 Reports the pointer efficiency of file in %
PREC 6 Sets the data precision for data compression methods PREC 6 Reports the data precision for data compression of the last record read PREC 6 Reports the data precision for data compression of the last record read
PROG or PRGN 6 or 7 Sets the name of the program that will write the next record. PRGN is DSS 6 only PROG 6 Reports the name of the program that will write the next record PROG 6 or 7 Reports the name of the program that wrote the last record read
PROT 6 Sets whether to overwrite existing records
PSEU 6 Sets the pseudo regular interval for the next record written PSEU 6 Sets the pseudo regular interval for a specified record
QPRO 6 Sets whether protection bit in quality flags is observed QPRO 6 Reports whether protection bit in quality flags is observed
RDAT 6 Sets the last written date of next record written RDAT 6 Reports the last written date of last record read
READ 6 Sets whether access to file is read only READ 7 Sets whether access to file is read only READ 6 or 7 Reports whether access to file is read only READ 6 or 7 Reports whether access to file is read only
RECL 7 Sets reclaim space level RECL 7 Reports the reclaim space level
RENA 7 Reports number of renamed records
REMO 6 Reports whether DSS file is remote
RTIM 6 Sets the last written time of next record written RTIM 6 Reports the last written time of last record read
RVER 6 Sets the version number for the next record written RVER 6 or 7 Reports the version number of last record read
SIZE 6 Sets the estimated file size for new file SIZE 6 Reports the file size in KB SIZE 6 or 7 Reports the file size in KB
SQUE 6 Sets whether a squeeze is performed when requested, even if it's not necessary SQUE 6 Reports whether a squeeze is performed when requested, even if it's not necessary SQUE 6 Reports whether file needs to be squeezed SQUE 6 or 7 Reports whether file needs to be squeezed
SQST 6 Sets whether to show status when squeezing file
STAT 6 or 7
  • DSS 6 - Reports the status of last operation
  • DSS 7 - Reports the severity of last operation
STAT 6 or 7
  • DSS 6 - Reports the status of last operation
  • DSS 7 - Reports the severity of last operation
SWAP 6 Reports whether the current hardware big endian (must swap words)
TABL 6 Sets the type of hash table TABL 6 Reports the type of hash table
TAG 6 Reports the tag of last record accessed TAG 6 Reports the tag of last record read
TOL 6 Sets the tolerance for replacing existing values
TOTA 6 or 7 Sets the total number of items for an multi-item operation TOTA 6 or 7 Reports the total number of items of an in-progress multi-item operation TOTA 7 Reports the total number of items of an in-progress multi-item operation
TWCA 6 Sets whether to use the time window as a selection criterion when generating a catalog
TYPE 6 Sets the data type for data to be written TYPE 6 or 7 Reports the data type of last record read
UNIT or FILN 6 Set the Fortran unit number of the next DSS File to open UNIT 6 Reports the Fortran unit number of DSS File
UPRT 6 Sets whether record times will be time of write instead the time the file was opened
VDTM 6 or 7 Sets the default native vertical datum. Alpha takes precedence over number if both are specified VDTM 7 Reports the default native vertical datum VDTM 6 or 7 Reports the default native vertical datum
VDOW 7 Sets whether incoming native vertical datum can overwrite the location record's native vertical datum VDOW 7 Reports whether incoming native vertical datum can overwrite the location record's native vertical datum VDOW 7 Reports whether incoming native vertical datum can overwrite the location record's native vertical datum
VERS 6 or 7 Reports the library version VERS 6 or 7 Reports the library version
WRIT 7 Reports whether the DSS file is opened in a writable mode
ZONE 6 Sets the time zone of the next record to write ZONE 6 Reports the time zone of last record read
80CO 6 Sets whether in 80 column output mode 80CO 6 Reports whether in 80 column output mode 80CO 6 Reports whether in 80 column output mode
See Also:
  • Field Details

    • UNDEFINED_FLOAT

      public static final float UNDEFINED_FLOAT
      See Also:
    • UNDEFINED_DOUBLE

      public static final double UNDEFINED_DOUBLE
      See Also:
    • UNDEFINED_INT

      public static final int UNDEFINED_INT
      See Also:
    • UNDEFINED_SHORT

      public static final int UNDEFINED_SHORT
      See Also:
    • UNDEFINED_TIME

      public static final long UNDEFINED_TIME
      See Also:
    • DSS_FUNCTION_zopen_ID

      public static final int DSS_FUNCTION_zopen_ID
      See Also:
    • DSS_FUNCTION_zclose_ID

      public static final int DSS_FUNCTION_zclose_ID
      See Also:
    • DSS_FUNCTION_zset_ID

      public static final int DSS_FUNCTION_zset_ID
      See Also:
    • DSS_FUNCTION_zget_ID

      public static final int DSS_FUNCTION_zget_ID
      See Also:
    • DSS_FUNCTION_zput_ID

      public static final int DSS_FUNCTION_zput_ID
      See Also:
    • DSS_FUNCTION_zgetBuff_ID

      public static final int DSS_FUNCTION_zgetBuff_ID
      See Also:
    • DSS_FUNCTION_zputBuff_ID

      public static final int DSS_FUNCTION_zputBuff_ID
      See Also:
    • DSS_FUNCTION_zmemoryGet_ID

      public static final int DSS_FUNCTION_zmemoryGet_ID
      See Also:
    • DSS_FUNCTION_zmemoryFree_ID

      public static final int DSS_FUNCTION_zmemoryFree_ID
      See Also:
    • DSS_FUNCTION_zreadDisk_ID

      public static final int DSS_FUNCTION_zreadDisk_ID
      See Also:
    • DSS_FUNCTION_zwriteDisk_ID

      public static final int DSS_FUNCTION_zwriteDisk_ID
      See Also:
    • DSS_FUNCTION_zpermRead_ID

      public static final int DSS_FUNCTION_zpermRead_ID
      See Also:
    • DSS_FUNCTION_zpermCreate_ID

      public static final int DSS_FUNCTION_zpermCreate_ID
      See Also:
    • DSS_FUNCTION_zpermWrite_ID

      public static final int DSS_FUNCTION_zpermWrite_ID
      See Also:
    • DSS_FUNCTION_zwriteEOF_ID

      public static final int DSS_FUNCTION_zwriteEOF_ID
      See Also:
    • DSS_FUNCTION_zinit_ID

      public static final int DSS_FUNCTION_zinit_ID
      See Also:
    • DSS_FUNCTION_zinitIfltab_ID

      public static final int DSS_FUNCTION_zinitIfltab_ID
      See Also:
    • DSS_FUNCTION_zlocking_ID

      public static final int DSS_FUNCTION_zlocking_ID
      See Also:
    • DSS_FUNCTION_znewFileSize_ID

      public static final int DSS_FUNCTION_znewFileSize_ID
      See Also:
    • DSS_FUNCTION_zgetFileSpace_ID

      public static final int DSS_FUNCTION_zgetFileSpace_ID
      See Also:
    • DSS_FUNCTION_zcheckKeys_ID

      public static final int DSS_FUNCTION_zcheckKeys_ID
      See Also:
    • DSS_FUNCTION_zflushToDisk_ID

      public static final int DSS_FUNCTION_zflushToDisk_ID
      See Also:
    • DSS_FUNCTION_zhash_ID

      public static final int DSS_FUNCTION_zhash_ID
      See Also:
    • DSS_FUNCTION_zcheck_ID

      public static final int DSS_FUNCTION_zcheck_ID
      See Also:
    • DSS_FUNCTION_zreadInfo_ID

      public static final int DSS_FUNCTION_zreadInfo_ID
      See Also:
    • DSS_FUNCTION_zcheckMultiUser_ID

      public static final int DSS_FUNCTION_zcheckMultiUser_ID
      See Also:
    • DSS_FUNCTION_zreadInternal_ID

      public static final int DSS_FUNCTION_zreadInternal_ID
      See Also:
    • DSS_FUNCTION_zwriteInternal_ID

      public static final int DSS_FUNCTION_zwriteInternal_ID
      See Also:
    • DSS_FUNCTION_zwriteNew_ID

      public static final int DSS_FUNCTION_zwriteNew_ID
      See Also:
    • DSS_FUNCTION_zwriteExisting_ID

      public static final int DSS_FUNCTION_zwriteExisting_ID
      See Also:
    • DSS_FUNCTION_zbinNew_ID

      public static final int DSS_FUNCTION_zbinNew_ID
      See Also:
    • DSS_FUNCTION_zbinUpdate_ID

      public static final int DSS_FUNCTION_zbinUpdate_ID
      See Also:
    • DSS_FUNCTION_zsetFile_ID

      public static final int DSS_FUNCTION_zsetFile_ID
      See Also:
    • DSS_FUNCTION_zquery_ID

      public static final int DSS_FUNCTION_zquery_ID
      See Also:
    • DSS_FUNCTION_zdelete_ID

      public static final int DSS_FUNCTION_zdelete_ID
      See Also:
    • DSS_FUNCTION_zundelete_ID

      public static final int DSS_FUNCTION_zundelete_ID
      See Also:
    • DSS_FUNCTION_zcopyFile_ID

      public static final int DSS_FUNCTION_zcopyFile_ID
      See Also:
    • DSS_FUNCTION_ztsStoreReg_ID

      public static final int DSS_FUNCTION_ztsStoreReg_ID
      See Also:
    • DSS_FUNCTION_ztsRegStoreBlock_ID

      public static final int DSS_FUNCTION_ztsRegStoreBlock_ID
      See Also:
    • DSS_FUNCTION_ztsStore_ID

      public static final int DSS_FUNCTION_ztsStore_ID
      See Also:
    • DSS_FUNCTION_ztsRetrieve_ID

      public static final int DSS_FUNCTION_ztsRetrieve_ID
      See Also:
    • DSS_FUNCTION_ztsRetrieveReg_ID

      public static final int DSS_FUNCTION_ztsRetrieveReg_ID
      See Also:
    • DSS_FUNCTION_ztsRegReadBlock_ID

      public static final int DSS_FUNCTION_ztsRegReadBlock_ID
      See Also:
    • DSS_FUNCTION_ztsWriteBlock_ID

      public static final int DSS_FUNCTION_ztsWriteBlock_ID
      See Also:
    • DSS_FUNCTION_ztsTrim_ID

      public static final int DSS_FUNCTION_ztsTrim_ID
      See Also:
    • DSS_FUNCTION_ztsStoreIrreg_ID

      public static final int DSS_FUNCTION_ztsStoreIrreg_ID
      See Also:
    • DSS_FUNCTION_ztsIrregReadBlock_ID

      public static final int DSS_FUNCTION_ztsIrregReadBlock_ID
      See Also:
    • DSS_FUNCTION_ztsIrregMergeBlocks_ID

      public static final int DSS_FUNCTION_ztsIrregMergeBlocks_ID
      See Also:
    • DSS_FUNCTION_ztsRetrieveIrreg_ID

      public static final int DSS_FUNCTION_ztsRetrieveIrreg_ID
      See Also:
    • DSS_FUNCTION_ztsIrregStoreBlock_ID

      public static final int DSS_FUNCTION_ztsIrregStoreBlock_ID
      See Also:
    • DSS_FUNCTION_ztsProcessTimes_ID

      public static final int DSS_FUNCTION_ztsProcessTimes_ID
      See Also:
    • DSS_FUNCTION_zcatalog_ID

      public static final int DSS_FUNCTION_zcatalog_ID
      See Also:
    • DSS_FUNCTION_zpdStore_ID

      public static final int DSS_FUNCTION_zpdStore_ID
      See Also:
    • DSS_FUNCTION_zpdRetrieve_ID

      public static final int DSS_FUNCTION_zpdRetrieve_ID
      See Also:
    • DSS_FUNCTION_zinquire_ID

      public static final int DSS_FUNCTION_zinquire_ID
      See Also:
    • DSS_FUNCTION_zsqueeze_ID

      public static final int DSS_FUNCTION_zsqueeze_ID
      See Also:
    • DSS_FUNCTION_ztextStore_ID

      public static final int DSS_FUNCTION_ztextStore_ID
      See Also:
    • DSS_FUNCTION_ztextRetrieve_ID

      public static final int DSS_FUNCTION_ztextRetrieve_ID
      See Also:
    • DSS_FUNCTION_zcopyRecord_ID

      public static final int DSS_FUNCTION_zcopyRecord_ID
      See Also:
    • DSS_FUNCTION_zrename_ID

      public static final int DSS_FUNCTION_zrename_ID
      See Also:
    • DSS_FUNCTION_zduplicateRecord_ID

      public static final int DSS_FUNCTION_zduplicateRecord_ID
      See Also:
    • DSS_FUNCTION_zarrayRetrieve_ID

      public static final int DSS_FUNCTION_zarrayRetrieve_ID
      See Also:
    • DSS_FUNCTION_zarrayStore_ID

      public static final int DSS_FUNCTION_zarrayStore_ID
      See Also:
    • DSS_FUNCTION_zbinaryStore_ID

      public static final int DSS_FUNCTION_zbinaryStore_ID
      See Also:
    • DSS_FUNCTION_zbinaryRetrieve_ID

      public static final int DSS_FUNCTION_zbinaryRetrieve_ID
      See Also:
    • DSS_FUNCTION_zcheckHashTable_ID

      public static final int DSS_FUNCTION_zcheckHashTable_ID
      See Also:
    • DSS_FUNCTION_zcheckInfo_ID

      public static final int DSS_FUNCTION_zcheckInfo_ID
      See Also:
    • DSS_FUNCTION_zcheckPathnameBins_ID

      public static final int DSS_FUNCTION_zcheckPathnameBins_ID
      See Also:
    • DSS_FUNCTION_zcheckPathnames_ID

      public static final int DSS_FUNCTION_zcheckPathnames_ID
      See Also:
    • DSS_FUNCTION_zspatialTinStore_ID

      public static final int DSS_FUNCTION_zspatialTinStore_ID
      See Also:
    • DSS_FUNCTION_zspatialTinRetrieve_ID

      public static final int DSS_FUNCTION_zspatialTinRetrieve_ID
      See Also:
    • DSS_FUNCTION_zaliasAdd_ID

      public static final int DSS_FUNCTION_zaliasAdd_ID
      See Also:
    • DSS_FUNCTION_zaliasRemove_ID

      public static final int DSS_FUNCTION_zaliasRemove_ID
      See Also:
    • DSS_FUNCTION_zaliasUtil_ID

      public static final int DSS_FUNCTION_zaliasUtil_ID
      See Also:
    • DSS_FUNCTION_zlocationStore_ID

      public static final int DSS_FUNCTION_zlocationStore_ID
      See Also:
    • DSS_FUNCTION_zlocationRetrieve_ID

      public static final int DSS_FUNCTION_zlocationRetrieve_ID
      See Also:
    • DSS_FUNCTION_zread_ID

      public static final int DSS_FUNCTION_zread_ID
      See Also:
    • DSS_FUNCTION_zwrite_ID

      public static final int DSS_FUNCTION_zwrite_ID
      See Also:
    • DSS_FUNCTION_internalUtility_ID

      public static final int DSS_FUNCTION_internalUtility_ID
      See Also:
    • DSS_FUNCTION_ztsAggregate_ID

      public static final int DSS_FUNCTION_ztsAggregate_ID
      See Also:
    • DSS_FUNCTION_ztsDisaggregate_ID

      public static final int DSS_FUNCTION_ztsDisaggregate_ID
      See Also:
    • DSS_FUNCTION_zspatialGridStore_ID

      public static final int DSS_FUNCTION_zspatialGridStore_ID
      See Also:
    • DSS_FUNCTION_zspatialGridRetrieve_ID

      public static final int DSS_FUNCTION_zspatialGridRetrieve_ID
      See Also:
    • DSS_FUNCTION_other_ID

      public static final int DSS_FUNCTION_other_ID
      See Also:
    • DSS_FUNCTION_javaNativeInterface_ID

      public static final int DSS_FUNCTION_javaNativeInterface_ID
      See Also:
    • MESS_METHOD_GLOBAL_ID

      public static final int MESS_METHOD_GLOBAL_ID
      See Also:
    • MESS_METHOD_GENERAL_ID

      public static final int MESS_METHOD_GENERAL_ID
      See Also:
    • MESS_METHOD_GET_ID

      public static final int MESS_METHOD_GET_ID
      See Also:
    • MESS_METHOD_PUT_ID

      public static final int MESS_METHOD_PUT_ID
      See Also:
    • MESS_METHOD_READ_ID

      public static final int MESS_METHOD_READ_ID
      See Also:
    • MESS_METHOD_WRITE_ID

      public static final int MESS_METHOD_WRITE_ID
      See Also:
    • MESS_METHOD_PERM_ID

      public static final int MESS_METHOD_PERM_ID
      See Also:
    • MESS_METHOD_OPEN_ID

      public static final int MESS_METHOD_OPEN_ID
      See Also:
    • MESS_METHOD_CHECK_ID

      public static final int MESS_METHOD_CHECK_ID
      See Also:
    • MESS_METHOD_LOCKING_ID

      public static final int MESS_METHOD_LOCKING_ID
      See Also:
    • MESS_METHOD_TS_READ_ID

      public static final int MESS_METHOD_TS_READ_ID
      See Also:
    • MESS_METHOD_TS_WRITE_ID

      public static final int MESS_METHOD_TS_WRITE_ID
      See Also:
    • MESS_METHOD_ALIAS_ID

      public static final int MESS_METHOD_ALIAS_ID
      See Also:
    • MESS_METHOD_COPY_ID

      public static final int MESS_METHOD_COPY_ID
      See Also:
    • MESS_METHOD_UTILITY_ID

      public static final int MESS_METHOD_UTILITY_ID
      See Also:
    • MESS_METHOD_CATALOG_ID

      public static final int MESS_METHOD_CATALOG_ID
      See Also:
    • MESS_METHOD_FILE_CHECK_ID

      public static final int MESS_METHOD_FILE_CHECK_ID
      See Also:
    • MESS_METHOD_JNI_ID

      public static final int MESS_METHOD_JNI_ID
      See Also:
    • MESS_METHOD_UNDEFINED_ID

      public static final int MESS_METHOD_UNDEFINED_ID
      See Also:
    • MESS_LEVEL_NONE

      public static final int MESS_LEVEL_NONE
      See Also:
    • MESS_LEVEL_CRITICAL

      public static final int MESS_LEVEL_CRITICAL
      See Also:
    • MESS_LEVEL_TERSE

      public static final int MESS_LEVEL_TERSE
      See Also:
    • MESS_LEVEL_GENERAL

      public static final int MESS_LEVEL_GENERAL
      See Also:
    • MESS_LEVEL_USER_DIAG

      public static final int MESS_LEVEL_USER_DIAG
      See Also:
    • MESS_LEVEL_INTERNAL_DIAG_1

      public static final int MESS_LEVEL_INTERNAL_DIAG_1
      See Also:
    • MESS_LEVEL_INTERNAL_DIAG_2

      public static final int MESS_LEVEL_INTERNAL_DIAG_2
      See Also:
    • onWindows

      public static final boolean onWindows
    • sysTimeZoneName

      public static final String sysTimeZoneName
  • Constructor Details

    • Heclib

      public Heclib()
  • Method Details

    • zerrorDecode

      public static int zerrorDecode(int errorCode, int[] highFunction, int[] lowFunction, int[] dssError, int[] status) throws Exception
      Decodes an error code returned from a DSS 7 routine. Such error codes are 9 decimal digits formatted as:
       123456789
       │┌>┌>┌>┌>
       ││ │ │ │
       ││ │ │ └── status
       ││ │ └──── dssError
       ││ └────── lowFunction
       │└──────── highFunction
       └───────── severity
       
      Parameters:
      errorCode - The 9-digit error code returned from a DSS 7 routine
      highFunction - Element 0 receives the ID of the highest function on the call stack when the error occurred. The text representation of the function ID can be obtained using getFunctionFromId(int)
      lowFunction - Element 0 receives the ID of the lowest function on the call stack when the error occurred The text representation of the function ID can be obtained using getFunctionFromId(int)
      dssError - Element 0 receives the DSS error number associated with the error
      status - Element 0 receives the system error number associated with the error
      Returns:
      The severity
      • 1 - INFORMATION
      • 2 - WARNING
      • 3 - INVALID_ARGUMENT
      • 4 - WARNING_NO_WRITE_ACCESS
      • 5 - WARNING_NO_FILE_ACCESS
      • 6 - WRITE_ERROR
      • 7 - READ_ERROR
      • 8 - CORRUPT_FILE
      • 9 - MEMORY_ERROR
      Throws:
      Exception - on null or zero-length parameter
    • getErrorInfo

      public static String getErrorInfo(int errorCode)
      Uses zerrorDecode to return a text message specifying the functions, errors, etc...
      Parameters:
      errorCode - The error code to pass to zerrorDecode
      Returns:
      A text message about the error
    • getFunctionFromId

      public static String getFunctionFromId(int functionId)
      Retrieves the text version of a DSS function ID from its numerical value
      Parameters:
      functionId - The function ID
      Returns:
      The text representation of the function ID
    • getDssErrorName

      public static String getDssErrorName(int dssError)
      Retrieves the text version of a DSS error from its numerical value
      Parameters:
      dssError - The DSS error code
      Returns:
      The text representation of the DSS error code
    • getDssErrorCode

      public static int getDssErrorCode(String errorName)
    • getMessageLevelFromId

      public static String getMessageLevelFromId(int messageLevel)
      Retrieves a text version of a DSS message level from its numerical value
      Parameters:
      messageLevel - The message level
      Returns:
      The text representation of the message level
    • getMessageGroupForFunction

      public static int getMessageGroupForFunction(int functionID)
      Retrieve a message function group ID from a function ID. The returned ID is suitable for use in zsetMessageLevel(int, int) or zgetMessageLevel(int).
      Parameters:
      functionID - The function ID to retrieve the message function group ID for
      Returns:
      the message function group ID
    • ints2floats

      public static float[] ints2floats(int[] intArray)
      Converts an int array into the byte-equivalent float array for working with user headers
      Parameters:
      intArray - The int array
      Returns:
      The float array
    • min

      public static int min(int... vals)
      Variadic minimum
      Parameters:
      vals - The values
      Returns:
      The minimum of the values
    • getLibraryMajorVersion

      public static int getLibraryMajorVersion()
      Retrieves the major version of the library (i.e., 7).
      Returns:
      The major version
    • getLibraryVersion

      public static int getLibraryVersion()
      Retrieves the numeric library version (e.g., 7-BG = 70207). Valid characters are A-Z, a-z A == 1, B == 2, a == 27, b == 28
      Returns:
      The numeric version
    • getLibrarySubVersion

      public static int getLibrarySubVersion()
      Retrieves the numeric library sub-version (e.g., 7-BG = 2) Valid characters are A-Z, a-z A == 1, B == 2, a == 27, b == 28
      Returns:
      The numeric sub-version
    • getLibraryMinorVersion

      public static int getLibraryMinorVersion()
      Retrieves the numeric library minor version (e.g., 7-BG = 7) Valid characters are A-Z, a-z A == 1, B == 2, a == 27, b == 28
      Returns:
      The numeric minor version
    • getLibraryVersionString

      public static String getLibraryVersionString()
      Retrieves the full library version string (e.g., "7-BG")
      Returns:
      The full library version string
    • ztsRetrieve

      public static int ztsRetrieve(int[] ifltab, TimeSeriesContainer tsc, String startDate, String startTime, String endDate, String endTime, int retrieveFlag)
      Retrieves time series dataset for a specified time window
      Parameters:
      ifltab - The file table of the DSS file
      tsc - Receives the time series values. Set the following fields on input
      startDate - The date of the start of the time window. Must be in a format that can be used by HecTime.set(String, String)
      startTime - The time of the start of the time window. Must be in a format that can be used by HecTime.set(String, String)
      endDate - The date of the end of the time window. Must be in a format that can be used by HecTime.set(String, String)
      endTime - The time of the end of the time window. Must be in a format that can be used by HecTime.set(String, String)
      retrieveFlag - specifies which values to include
      • REGULAR TIME SERIES
        •  0 - include entire time window and generate times array
        • -1 - trim to existing data and generate times array
        • -2 - include entire time window and do not generate times array
        • -3 - trim to existing data and do not generate times array
      • IRREGULAR TIME SERIES
        • 0 - include only values within the time window
        • 1 - include the value immediately before the time window
        • 2 - include the value immediately after the time window
        • 3 - include then values immediately before and after the time window
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • ztsStore

      public static int ztsStore(int[] ifltab, TimeSeriesContainer tsc, int storageFlag)
      Stores a time series dataset
      Parameters:
      ifltab - The file table of the DSS file
      tsc - The dataset to store
      storageFlag - The data storage plan
      • REGULAR TIME SERIES
        • 0 - always replace values in file
        • 1 - only store non-missing values that are missing in file
        • 2 - always store all values even if all missing
        • 3 - don't create empty records and remove any records made empty
        • 4 - don't replace non-missing values with missing values
      • IRREGULAR TIME SERIES
        • 0 - merge data into existing data, overwriting individual values as necessary
        • 1 - delete existing data in incoming time window before storing
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zpdStore

      public static int zpdStore(int[] ifltab, PairedDataContainer pdc)
      Stores a paired data record
      Parameters:
      ifltab - The file table for the DSS file
      pdc - The paired data to store
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zpdRetrieve

      public static int zpdRetrieve(int[] ifltab, PairedDataContainer pdc)
      Retrieves a paired data record
      Parameters:
      ifltab - The file table of the DSS file
      pdc - Receives the paired data. Set the .fullName field with DataContainer.setName(String) on input
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • ztextStore

      public static int ztextStore(int[] ifltab, TextContainer textContainer)
      Stores a text record
      Parameters:
      ifltab - The file table of the DSS file
      textContainer - The text or text table to store
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • ztextRetrieve

      public static int ztextRetrieve(int[] ifltab, TextContainer textContainer)
      Retrieves a text record
      Parameters:
      ifltab - The file table of the DSS file
      textContainer - Receives the text or text table. Set the .fullName field with DataContainer.setName(String) on input
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • ztinRetrieve

      public static int ztinRetrieve(int[] ifltab, TinContainer tinContainer, boolean retrieveData)
      Retrieves a TIN record
      Parameters:
      ifltab - The file table of the DSS file
      tinContainer - Receives the TIN data. Set the .fullName field with DataContainer.setName(String) on input
      retrieveData - Data retrieval flag
      • 0 - retrieve metadata only
      • 1 - retrieve metadata and data
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • ztinStore

      public static int ztinStore(int[] ifltab, TinContainer tinContainer)
      Stores TIN data
      Parameters:
      ifltab - The file table of the DSS file
      tinContainer - The TIN data to store
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zgridRetrieve

      public static int zgridRetrieve(int[] ifltab, GridStructContainer gridStruct, boolean retrieveData)
      Retrieves a gridded data record
      Parameters:
      ifltab - The file table of the DSS file
      gridStruct - Receives the gridded data. Set the .fullName field with DataContainer.setName(String) on input
      retrieveData - Data retrieval flag
      • 0 - retrieve metadata only
      • 1 - retrieve metadata and data
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zgridRetrieveVersion

      public static int zgridRetrieveVersion(int[] ifltab, String path, int[] gridStructVersion)
      Retrieves the structure version of a gridded data record
      Parameters:
      ifltab - The file table of the DSS file
      path - The pathname of the gridded data record
      gridStructVersion - Element 0 receives the grid structure version
      •   0 - DSS 6 grid
      • 1000 - DSS 7 grid
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zgridStore

      public static int zgridStore(int[] ifltab, GridStructContainer gridStruct)
      Stores gridded data
      Parameters:
      ifltab - The file table of the DSS file
      gridStruct - The gridded data to store
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zcatalog

      public static int zcatalog(int[] ifltab, HecDssCatalog catalog)
      Retrieves a catalog of the DSS file
      Parameters:
      ifltab - The file table of the DSS file
      catalog - Receives the catalog. The following .pathnameWithWild field must be set on input. The following fields can optionally be set to further control the pathnames returned
      • .statusWanted - type of records cataloged
        •   0 - all valid records (primary and aliases)
        •   1 - primary records only
        •   2 - alias records only
        •  11 - deleted records only
        •  12 - renamed records only
        • 100 - all records regardless if deleted, renamed, etc.
      • .dataTypeStart - only catalog records with record type >= this
      • .dataTypeStart - only catalog records with record type <= this
      Record type are
      •  20 - location
      •  90 - array (DSS 7 only)
      •  91 - integer array (DSS 6 only)
      •  92 - float array (DSS 6 only)
      •  93 - double array (DSS 6 Only)
      • 100 - regular-interval time series
      • 101 - regular-interval time series pattern
      • 102 - regular-interval time series profile
      • 105 - regular-interval time series doubles
      • 107 - regular-interval time series double profile
      • 110 - irregular-interval time series
      • 111 - irregular-interval time series pattern
      • 112 - irregular-interval time series profile
      • 115 - irregular-interval time series doubles
      • 117 - irregular-interval time series double profile
      • 200 - paired data
      • 205 - paired data doubles
      • 300 - text data
      • 310 - text table
      • 400 - gridded - undefined grid with time
      • 401 - gridded - undefined grid
      • 410 - gridded - HRAP grid with time reference
      • 411 - gridded - HRAP grid
      • 420 - gridded - Albers with time reference
      • 421 - gridded - Albers
      • 430 - gridded - SHG with time reference
      • 431 - gridded - SHG
      • 450 - spatial - TIN (DSS 7 only)
      • 600 - generic file
      • 610 - image
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zwhatChangedSetStart

      public static int zwhatChangedSetStart(int[] ifltab, HecDssCatalog dssCatalog, String pathnameWithWild, boolean useCRC)
      Sets the starting catalog for comparison against a later catalog, optionally retrieving the catalog
      Parameters:
      ifltab - The file table of the DSS file
      dssCatalog - Receives the starting catalog if not null
      pathnameWithWild - The pathname mask to catalog. The wildcard character is '*' and may only be specified at the start and/or end of individual pathname parts (or be the entire pathname part). May be null to catalog all records
      useCRC - Specifies how the comparison will be performed
      • true  - record cyclic redundancy checks will be compared
      • false  - record last written times will be compared
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
      See Also:
    • zwhatChanged

      public static int zwhatChanged(int[] ifltab, HecDssCatalog catalog)
      Retrieves a catalog of all records changed since the last call to zwhatChangedSetStart(). The DSS file must not have been closed in between or the internal catalog will be lost. Record CRC values will be compared if the useCRC parameter to zwhatChangedSetStart() was set to true; otherwise record last written times will be compared
      Parameters:
      ifltab - The file table of the DSS file
      catalog - Receives the catalog of records changed
      Returns:
      The number of records changed on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zwhatChangedCompare

      public static int zwhatChangedCompare(int[] ifltab, HecDssCatalog dssCatalogBefore, HecDssCatalog dssCatalogChanged, String pathWithWild, boolean boolUseCRC)
      Retrieves a catalog of records changed since the last call to zwhatChangedSetStart(). The catalog may be a subset of all records changed
      Parameters:
      ifltab - The file table of the DSS file
      dssCatalogBefore - The catalog to compare against
      dssCatalogChanged - Receives the catalog of changed records
      pathWithWild - The pathname mask of changed records to catalog. The wildcard character is '*' and may only be specified at the start and/or end of individual pathname parts (or be the entire pathname part). May be null to catalog all changed records
      boolUseCRC - Specifies how the comparison will be performed
      • true  - record cyclic redundancy checks will be compared, but only if dssCatalogBefore.crcValues is not null (i.e., if the useCRC parameter to zwhatChangedSetStart() was set to true)
      • false - record last written times will be compared
      Returns:
      The number of records changes cataloged on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zerrorCheck

      public static int zerrorCheck()
      Retrieves the severity of the last error encountered
      Returns:
      The severity
      • 0 - NO ERROR
      • 1 - INFORMATION
      • 2 - WARNING
      • 3 - INVALID_ARGUMENT
      • 4 - WARNING_NO_WRITE_ACCESS
      • 5 - WARNING_NO_FILE_ACCESS
      • 6 - WRITE_ERROR
      • 7 - READ_ERROR
      • 8 - CORRUPT_FILE
      • 9 - MEMORY_ERROR
    • zerrorGet

      public static int zerrorGet(DSSErrorMessage errorMessage)
      Retrieves the details of the last error encountered
      Parameters:
      errorMessage - Receives the error details
      Returns:
      The error type
      • 0 - ERROR_TYPE_NONE
      • 1 - ERROR_TYPE_WARNING
      • 2 - ERROR_TYPE_ACCESS
      • 3 - ERROR_TYPE_FILE
      • 4 - ERROR_TYPE_MEMORY
    • zerrorClear

      public static int zerrorClear()
      Clears the last error encountered
      Returns:
      Not used (undefined)
    • zrecInfo

      public static int zrecInfo(int[] ifltab, HecDSSRecordInfo recordInfo, String startDate, String startTime, String endDate, String endTime)
      Retrieves information about a record
      Parameters:
      ifltab - File table for DSS file
      recordInfo - Receives the record information. The following fields must be set on input
      • .pathname - the pathname of the record
      • .dssFilename - DSS file name
      startDate - The date of the start of the time window for time series records. Must be in a format that can be used by HecTime.set(String, String)
      startTime - The time of the start of the time window for time series records. Must be in a format that can be used by HecTime.set(String, String)
      endDate - The date of the end of the time window for time series records. Must be in a format that can be used by HecTime.set(String, String)
      endTime - The time of the end of the time window for time series records. Must be in a format that can be used by HecTime.set(String, String)
      Returns:
      The status
      •  0 - success
      • -1 - record not found
    • zsetMessageLevel

      public static void zsetMessageLevel(int functionGroupID, int levelID)
      Sets the message level for a specified function group
      Parameters:
      functionGroupID - The function group to set message level for
      • MESS_METHOD_GLOBAL_ID (All DSS 7 levels + DSS 6 level)
      • MESS_METHOD_GENERAL_ID (All DSS 7 levels but not DSS 6 level)
      • MESS_METHOD_GET_ID
      • MESS_METHOD_PUT_ID
      • MESS_METHOD_READ_ID
      • MESS_METHOD_WRITE_ID
      • MESS_METHOD_PERM_ID
      • MESS_METHOD_OPEN_ID
      • MESS_METHOD_CHECK_ID
      • MESS_METHOD_LOCKING_ID
      • MESS_METHOD_TS_READ_ID
      • MESS_METHOD_TS_WRITE_ID
      • MESS_METHOD_ALIAS_ID
      • MESS_METHOD_COPY_ID
      • MESS_METHOD_UTILITY_ID
      • MESS_METHOD_CATALOG_ID
      • MESS_METHOD_FILE_CHECK_ID
      • MESS_METHOD_JNI_ID
      • MESS_METHOD_UNDEFINED_ID
      levelID - The message level
      • MESS_LEVEL_NONE
      • MESS_LEVEL_CRITICAL
      • MESS_LEVEL_TERSE
      • MESS_LEVEL_GENERAL
      • MESS_LEVEL_USER_DIAG
      • MESS_LEVEL_INTERNAL_DIAG_1
      • MESS_LEVEL_INTERNAL_DIAG_2
    • zgetMessageLevel

      public static int zgetMessageLevel(int functionGroupID)
      Retrieves the message level for a specified function group
      Parameters:
      functionGroupID - The function group to retrieve the message level for
      • MESS_METHOD_GLOBAL_ID (All DSS 7 levels + DSS 6 level)
      • MESS_METHOD_GENERAL_ID (All DSS 7 levels but not DSS 6 level)
      • MESS_METHOD_GET_ID
      • MESS_METHOD_PUT_ID
      • MESS_METHOD_READ_ID
      • MESS_METHOD_WRITE_ID
      • MESS_METHOD_PERM_ID
      • MESS_METHOD_OPEN_ID
      • MESS_METHOD_CHECK_ID
      • MESS_METHOD_LOCKING_ID
      • MESS_METHOD_TS_READ_ID
      • MESS_METHOD_TS_WRITE_ID
      • MESS_METHOD_ALIAS_ID
      • MESS_METHOD_COPY_ID
      • MESS_METHOD_UTILITY_ID
      • MESS_METHOD_CATALOG_ID
      • MESS_METHOD_FILE_CHECK_ID
      • MESS_METHOD_JNI_ID
      • MESS_METHOD_UNDEFINED_ID
      Returns:
      The current message level
      • MESS_LEVEL_NONE
      • MESS_LEVEL_CRITICAL
      • MESS_LEVEL_TERSE
      • MESS_LEVEL_GENERAL
      • MESS_LEVEL_USER_DIAG
      • MESS_LEVEL_INTERNAL_DIAG_1
      • MESS_LEVEL_INTERNAL_DIAG_2
    • zarrayRetrieve

      public static int zarrayRetrieve(int[] ifltab, ArrayContainer arrayContainer)
      Retrieves an array record
      Parameters:
      ifltab - The file table of the DSS file
      arrayContainer - Receives the array data. Set the .fullName field with DataContainer.setName(String) on input
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zarrayStore

      public static int zarrayStore(int[] ifltab, ArrayContainer arrayContainer)
      Stores an array record
      Parameters:
      ifltab - The file table of the DSS file
      arrayContainer - The array data to store
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zcatalogFile

      public static int zcatalogFile(int[] ifltab, String catalogName, boolean sorted, String pathWithWildChars)
      Generates a catalog file for a DSS file
      Parameters:
      ifltab - The file table for the DSS file
      catalogName - The name of the catalog file
      sorted - Whether to sort the pathnames in ABCFED order
      pathWithWildChars - Specifies a subset of pathnames to catalog
      • null - catalog the entire file
      • non-null - the subset to catalog. This is a pathname that has the '*' character specified at the beginning and/or end of any pathname part(s)
        • "*abc"  - matches part name that ends with abc
        • "abc*"  - matches part name that starts with abc
        • "*abc*" - matches part name that contains abc
        • "abc"   - matches part name that is exactly abc
        • "*"     - matches any part name
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zgetCatalogSortAddresses

      public static int zgetCatalogSortAddresses(int[] ifltab, long[] sortAddresses, int sortAddressesLen)
      Reads the list of addresses to sorted pathnames (if it exists) in order to presort the catalog
      Parameters:
      ifltab - The file table of the DSS file
      sortAddresses - Receives the pathname bin addresses of the full sorted list of pathnames
      sortAddressesLen - The number of elements in sortAddresses
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zsetCatalogSortAddresses

      public static int zsetCatalogSortAddresses(int[] ifltab, long[] sortAddresses, int sortAddressesLen)
      Writes the list of addresses to sorted pathnames after a catalog sort in order to presort the next catalog
      Parameters:
      ifltab - The file table of the DSS file
      sortAddresses - The pathname bin addresses of the full sorted list of pathnames
      sortAddressesLen - The number of elements in sortAddresses
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zfileAccessInfo

      public static int zfileAccessInfo(int[] ifltab, int[] accessMode, int[] numberAccesses, int[] numberWriting, int[] pidsArray, int[] modesArray, int arraySize, int[] numberPids)
      Gets information about other processes writing to the file
      Parameters:
      ifltab - The file table of the DSS file
      accessMode - Element 0 receives the current access mode for this process
      • 0 - GENERAL - no errors if write without permission
      • 1 - READ - read-only
      • 2 - MULTI-USER - full read/write (slow but safe)
      • 3 - SINGLE-USER ADVISORY (default) - fast read/write, receives notification if another process wants access
      • 4 - EXCLUSIVE - single user only, used for squeezing
      numberAccesses - Element 0 receives the number of processes accessing the file, including this process
      numberWriting - Element 0 receives the number of processes writing to the file, including this process
      pidsArray - Receives the process IDs of other processes writing to the file, up to arraySize elements. Must have at lease arraySize elements
      modesArray - Receives the access modes of other processes writing to the file, up to arraySize elements. Must have at lease arraySize elements. Each element corresponds to the same element in pidsArray
      arraySize - The maximum number of pids and modes to retrieve. pidsArray and modesArray must have at least this many elements
      numberPids - The number of pids and modes retrieved (%lt;= arraySize)
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zerrorCode

      public static int zerrorCode(int[] ifltab)
      Retrieves the last error encountered for the DSS file
      Parameters:
      ifltab - The file table of the DSS file
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zcheckFile

      public static int zcheckFile(int[] ifltab)
      Exhaustively checks DSS file integrity. Resource intensive
      Parameters:
      ifltab - The file table of the DSS file
      Returns:
    • zlastWriteTime

      public static long zlastWriteTime(int[] ifltab, String pathname)
      Retrieves the last written time for a record in epoch milliseconds
      Parameters:
      ifltab - The file table of the DSS file
      pathname - The pathname of the record
      Returns:
      The last written time of the record or 0 if the record is not found
    • zlastWriteTimeFile

      public static long zlastWriteTimeFile(int[] ifltab)
      Retrieves the last written time for a DSS file
      Parameters:
      ifltab - The file table of the DSS file
      Returns:
      The last written time of the file or 0 on error
    • zinquire

      public static long zinquire(int[] ifltab, String parameter)
      Queries a file parameter

      Usage is as follows:

      Parameter Version Description Return Value
      CAAL 7 Reports the number of catalog sort records added since last sort The number of catalog sort records added since last sort
      CALL 7 Reports the catalog sort list length The catalog sort list length
      CATS 7 Reports the catalog sort list status
      • 0 - no sort list available
      • 1 - no updates since last sort (ready to use)
      • 2 - some updates since last sort (further sorting required)
      • 3 - significant updates since last sort (complete re-sort required)
      COLL 6 or 7
      • DSS 6 - reports whether the file contains collection records
      • DSS 7 - reports the number of collection records in the file
      • DSS 6 - 0 or 1
      • DSS 7 - the number of collection records in the file
      CURR 7 Reports the current item number of an in-progress multi-item operation The current item number
      DEAD 6 or 7 Reports percentage of file that is dead space Dead space percentage
      DELE 6 or 7 Reports number of deleted records in file Number of deleted records
      DSIZ 7 Reports the dead space size in words The dead space size
      ERRO 6 or 7 Reports the current error status Error number
      EXPA 7 Reports the number of expansions The number of expansions
      FSIZ 6 or 7 Reports the file size in words The file size in words
      FTIM 7 Reports the last written time of the file in epoch milliseconds The last written time in epoch milliseconds
      FVER 6 or 7 Reports the version of the DSS file Numeric version of the file
      HAND or UNIT 6 or 7
      • DSS 6 - reports the Fortran unit number or file handle of DSS File (see "HAND" parameter in zset(String, String, int))
      • DSS 7 - Reports the file handle of DSS file
      The file handle or unit number
      MAXA 7 Reports the length of the longest A part The length of the longest A part
      MAXB 7 Reports the length of the longest B part The length of the longest B part
      MAXC 7 Reports the length of the longest C part The length of the longest C part
      MAXD 7 Reports the length of the longest D part The length of the longest D part
      MAXE 7 Reports the length of the longest E part The length of the longest E part
      MAXF 7 Reports the length of the longest F part The length of the longest F part
      MAXP 7 Reports the maximum number of pathnames expected The maximum number of pathnames expected
      MHAN 7 Reports the message output handle The handle of the message output device
      MLVL or MLEV 6 or 7 Reports the global message level
      •  0 - None
      •  1 - Critical
      •  2 - Terse
      •  4 - General
      •  5 - User Diagnostics
      • 11 - Internal Diagnostic
      • 13 - Internal Debug
      MTIM 7 Reports the last time this process wrote to the file in epoch milliseconds The last time this process wrote to the file in epoch milliseconds
      MULT 6 or 7 Reports Whether the DSS file is in multi user mode
      • 0 - GENERAL. No error on write without permission
      • 1 - READ. Read only
      • 2 - MULTI-USER. Read/write with multi-user (slow) but necessary for multiple processes writing to same file
      • 3 - ADVISORY (default). Read/write with single-user but can be notified if another process wants to write
      • 4 - EXCLUSIVE. Prevents access from other processes. Used for squeezing
      MUNI 6 or 7 Reports Fortran unit number of message output The unit number
      NALI 7 Reports the number of alias records in the DSS file The number of aliased records
      NDAT 7 Reports the logical number of data elements to store in the info area The logical number of data elements
      NERR 7 Reports the number errors encountered in an in-progress multi-item operation The number of errors encountered
      NOTH 7 Reports the number of other processes accessing the file The number of processes
      NPRI 7 Reports the number of primary (non-alias) records in the DSS file The number of primary (non-alias) records
      NREC 6 or 7 Reports the total number (primary and alias) records in the DSS file The total number (primary and alias) records
      OTHE 7 Reports whether other processes are accessing the file 0 if no other processes accessing file, otherwise non-zero
      PREC 6 Reports the data precision for data compression of the last record read
      • -6 - .000001
      • -5 - .00001
      • -4 - .0001
      • -3 - .001
      • -2 - .01
      • -1 - .1
      •  0 - 1
      •  1 - 10
      •  2 - 100
      •  3 - 1000
      •  4 - 10000
      •  5 - 100000
      •  6 - 1000000
      READ 6 or 7 Reports whether access to file is read only
      • DSS 6
        • 0 - file is not in read only state
        • 1 - file is in read only state
      • DSS 7
        • 0 - file is closed
        • 1 - file is in read only state
        • 2 - file is in read write state
      RECL 7 Reports the reclaim space level The reclaim space level
      RENA 7 Reports number of renamed records in file Number of renamed records
      SIZE 6 or 7 Reports the file size in KB The file size
      SQUE 6 or 7 Reports whether file needs to be squeezed 0 or 1
      STAT 6 or 7
      • DSS 6 - reports the status of last operation
      • DSS 7 - reports the severity of last operation
      • DSS 6 - the status
      • DSS 7 - the severity
        • 0 - SUCCESS
        • 1 - INFORMATION
        • 2 - WARNING
        • 3 - INVALID_ARGUMENT
        • 4 - WARNING_NO_WRITE_ACCESS
        • 5 - WARNING_NO_FILE_ACCESS
        • 6 - WRITE_ERROR
        • 7 - READ_ERROR
        • 8 - CORRUPT_FILE
        • 9 - MEMORY_ERROR
      TOTA 7 Reports the total number of items of an in-progress multi-item operation The number total number of items
      WRIT 7 Reports whether the DSS file is in opened in a writable mode 0 or 1
      Parameters:
      ifltab - The file table of the DSS file
      parameter - The parameter to inquire about
      Returns:
      The value as described above
      See Also:
    • zgetRecordBasics

      public static int zgetRecordBasics(int[] ifltab, HecDSSRecordBasics recordBasics)
      Retrieves basic information about a record
      Parameters:
      ifltab - The file table of the DSS file
      recordBasics - Receives the record information. Use new object created with HecDSSRecordBasics(String)
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zaliasAdd

      public static int zaliasAdd(int[] ifltab, String primaryPathname, String aliasPathname)
      Adds an alias to a primary pathname
      Parameters:
      ifltab - The file table of the DSS file
      primaryPathname - The pathname to add an alias for
      aliasPathname - The alias
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zaliasGetPrimary

      public static int zaliasGetPrimary(int[] ifltab, String aliasPathname, stringContainer primaryPathname)
      Retrieve the primary pathname for an alias pathname
      Parameters:
      ifltab - The file table of the DSS file
      aliasPathname - The alias pathname to retrieve the primary pathname for
      primaryPathname - Receives the primary pathname
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zaliasRemove

      public static int zaliasRemove(int[] ifltab, String pathname, boolean removeAll)
      Removes an alias pathname or all aliase pathnames for a primary pathname
      Parameters:
      ifltab - The file table of the DSS file
      pathname - The alias pathname to remove. If removeAll == true this may be the primary pathname or any of its aliases
      removeAll - Specifies whether to remove all alias pathnames
      Returns:
    • zaliasList

      public static int zaliasList(int[] ifltab, String aliasPathname, StringArrayContainer pathnameList)
      Retrieves all alias pathnames for a specified pathname
      Parameters:
      ifltab - The file table of the DSS file
      aliasPathname - The pathname to retrieve the aliases for. May be an alias pathname or a primary pathname
      pathnameList - Receives the list of pathnames. The primary pathname will be at .stringArray[0], if it exists
      Returns:
      The length of pathnameLIst.stringArray. Will be 0 if no primary pathname was found
    • zlocationRetrieve

      public static int zlocationRetrieve(int[] ifltab, DataContainer dataContainer)
      Retrieves a location record
      Parameters:
      ifltab - The file table of the DSS file
      dataContainer - Receives the location record. The .fullName field must be set on input and be of the form
      • A part - the A part of the location
      • B part - the B part of the location
      • C part - "Location Info"
      • D part - empty
      • E part - empty
      • F part - empty
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zlocationStore

      public static int zlocationStore(int[] ifltab, DataContainer dataContainer)
      Stores a location record
      Parameters:
      ifltab - The file table of the DSS file
      dataContainer - The location record. The .fullName field must be of the form
      • A part - the A part of the location
      • B part - the B part of the location
      • C part - "Location Info"
      • D part - empty
      • E part - empty
      • F part - empty
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zgetDssFileVersion

      public static int zgetDssFileVersion(int[] ifltab)
      Retrieves the major version (i.e., 6 or 7) of a DSS file
      Parameters:
      ifltab - The file table of the DSS file
      Returns:
      The major version
    • zgetFileVersion

      public static int zgetFileVersion(String dssFileName)
      Retrieves the major version (i.e., 6 or 7) of a DSS file
      Parameters:
      dssFileName - The name of the DSS file
      Returns:
      The major version
    • getProcessName

      public static String getProcessName(int processID)
      Retrieves the process name associated with a process ID
      Parameters:
      processID - The process ID
      Returns:
      The process name if found, otherwise "No such process".
    • decodeHollerith

      @Deprecated public static String decodeHollerith(int[] ints)
      Deprecated.
      Do NOT use for anything other that decoding strings encoded by legacy applications!
      Pure Java method to decode Hollerith integers into a String
      Parameters:
      ints - The integers that are the Hollerith-encoded string
      Returns:
      The decoded string
    • encodeHollerith

      @Deprecated public static void encodeHollerith(String s, int[] ints)
      Deprecated.
      Do NOT use this for anything except for encoding strings that will be decoded by legacy applications!
      Pure Java method to encode a string into Hollerith integers
      Parameters:
      s - The string to encode
      ints - The integers to encode into
    • holString

      @Deprecated public static String holString(int[] hol, int length)
      Deprecated.
      Converts an int array to a Java String
      Parameters:
      hol - The integer array
      length - The number of characters to convert. Must have at least (length-1)/4+1 elements
      Returns:
      The resulting String
      See Also:
    • holString

      @Deprecated public static String holString(float[] hol, int length)
      Deprecated.
      Converts a float array to a Java String
      Parameters:
      hol - The float array
      length - The number of characters to convert. Must have at least (length-1)/4+1 elements
      Returns:
      The resulting String
      See Also:
    • StringHol

      @Deprecated public static void StringHol(String str, int length, float[] hol)
      Deprecated.
      Converts a Java String to a float array
      Parameters:
      str - The String to convert
      length - The number of characters to convert
      hol - The resulting float array. Must have at least (length-1)/4+1 elements
      See Also:
    • StringHol

      @Deprecated public static void StringHol(String str, int length, int[] hol)
      Deprecated.
      Converts a Java String to a int array
      Parameters:
      str - The String to convert
      length - The number of characters to convert
      hol - The resulting float array. Must have at least (length-1)/4+1 elements
      See Also:
    • openLogFile

      public static int openLogFile(String filename)
      Opens a log file for DSS logging
      Parameters:
      filename - The file name
      Returns:
      The status is zero if successful
    • closeLogFile

      public static int closeLogFile()
      Closes the DSS log file and switches logging to the console
      Returns:
      The status is zero on success.
    • writeToLogFile

      public static int writeToLogFile(String message)
      write a message to the DSS log file
      Parameters:
      message - The string to write
      Returns:
      The status is zero on success.
    • flushLogFile

      public static int flushLogFile()
      flushes the DSS log file
      Returns:
      zero on success.
    • getEPartFromInterval

      @Deprecated public static String getEPartFromInterval(int interval, int[] status)
      Deprecated.
    • getDSSEPartFromInterval

      public static String getDSSEPartFromInterval(int interval, int[] status)
      Returns DSS E-Part interval using DSS7+ conventions
      Parameters:
      interval - Input in minutes
      status - set to 0 if successful
      Returns:
      E-Part
    • squeezeDSS

      public static int squeezeDSS(String dssFileName)
      Squeezes a DSS file
      Parameters:
      dssFileName - The name of the DSS file to squeeze
      Returns:
      0 on success, otherwise non-zero
    • zbegdt

      @Deprecated public static void zbegdt(int julian, int interval, int[] year, int[] month, int[] day, int[] block, int DSSVersion)
    • zckmul

      public static void zckmul(int[] ifltab)
      Switches from advisory single-user mode to multi-user mode if another process has requested write access to the file
      Parameters:
      ifltab - The file table of the DSS file
    • zflush

      public static void zflush(int[] ifltab, int forceFlush)
      Flushes DSS output buffer to disk and DSS message buffer to output device (DSS 7 only)
      Parameters:
      ifltab - The file table of the DSS file
      forceFlush -
      • 0 - flush to disk only if new writes since last flush
      • non-zero - flush to disk without checking for new writes
    • zcheckAccessReset

      public static int zcheckAccessReset(int[] ifltab, boolean forceReopen, int quiescentTimeMills)
      Resets a DSS file to advisory single-user mode by closing and re-opening it (DSS 7 only). Should be called either at the end of a group of writes, or on a thread that calls it not more often than once every 5 seconds.
      Parameters:
      ifltab - The file table of the DSS file
      forceReopen -
      • 0 - resets the file only if it currently in multi-user mode and has not been written to using this file table for at least the number milliseconds specified in quiescentTimeMills.
      • non-zero - resets the file regardless of any considerations
      quiescentTimeMills - The minimum number of milliseconds since the last write using this file table before the file will be reset if forceReopen is 0
      Returns:
      0 if no error or if called on a DSS 6 file, non-zero otherwise
    • zclose

      public static void zclose(int[] ifltab)
      Closes a DSS file
      Parameters:
      ifltab - The file table of the DSS file to close
    • zcheck

      public static void zcheck(int[] ifltab, String pathname, int[] numberHeader, int[] numberData, int[] exists)
      Determines whether a pathname exists and the size of the header and data areas if it does.
      Parameters:
      ifltab - The file table of the DSS file to check
      pathname - The pathname to search for
      numberHeader - Element 0 receives he size of the header area
      numberData - Element 0 receives the size of the data area
      exists - Element 0 receives 0 if pathname doesn't exist, otherwise non-zero
    • zckpnb

      public static void zckpnb(int[] ifltab, int[] nerror)
      Checks a DSS file for structural errors.
      Parameters:
      ifltab - The file table of the DSS file to check
      nerror - Element 0 receives 0 if no errors, otherwise non-zero
    • zcklnk

      public static void zcklnk(int[] ifltab, int[] nerror)
      Checks a DSS file's links for possible errors.
      Parameters:
      ifltab - The file table of the DSS file to check
      nerror - Element 0 receives 0 if no errors, otherwise non-zero
    • zckpat

      public static void zckpat(int[] ifltab, int[] nerror)
      Checks a DSS file's pathnames for possible errors.
      Parameters:
      ifltab - The file table of the DSS file to check
      nerror - Element 0 receives 0 if no errors, otherwise non-zero
    • zcorec

      @Deprecated public static int zcorec(int[] ifltabFrom, int[] ifltabTo, String pathnameFrom, String pathnameTo, int[] buffer1, int buffer1Size, int[] buffer2, int buffer2Size)
      Copies a record to another pathname in the same DSS file or to a different DSS file with same or different pathname
      Parameters:
      ifltabFrom - The file table of the source DSS file
      ifltabTo - The file table of the destination DSS file. May be the same as ifltabFrom if pathnameFrom and pathnameTo are not the same
      pathnameFrom - The source pathname
      pathnameTo - The destination pathname. Must differ from pathnameFrom if copying in the same DSS file
      buffer1 - Not used
      buffer1Size - Not used
      buffer2 - Not used
      buffer2Size - Not used
      Returns:
      0 for success, otherwise non-zero
    • zcopyRecord

      public static int zcopyRecord(int[] ifltabFrom, int[] ifltabTo, String pathnameFrom, String pathnameTo)
      Copies a record to another pathname in the same DSS file or to a different DSS file with same or different pathname
      Parameters:
      ifltabFrom - The file table of the source DSS file
      ifltabTo - The file table of the destination DSS file. May be the same as ifltabFrom if pathnameFrom and pathnameTo are not the same
      pathnameFrom - The source pathname
      pathnameTo - The destination pathname. Must differ from pathnameFrom if copying in the same DSS file
      Returns:
      0 for success, otherwise non-zero
    • zcofil

      @Deprecated public static int zcofil(int[] ifltabFrom, int[] ifltabTo, int[] buffer1, int buffer1Size, int[] buffer2, int buffer2Size)
      Deprecated.
      Copies one DSS file into another DSS file
      Parameters:
      ifltabFrom - The file table of the source DSS file
      ifltabTo - The file table of the destination DSS file
      buffer1 - Not used
      buffer1Size - Not used
      buffer2 - Not used
      buffer2Size - Not used
      Returns:
      0 for sucess, otherwise non-zero
    • zcopyFile

      public static int zcopyFile(int[] ifltabFrom, int[] ifltabTo)
      Copies one DSS file into another DSS file
      Parameters:
      ifltabFrom - The file table of the source DSS file
      ifltabTo - The file table of the destination DSS file
      Returns:
      0 for sucess, otherwise non-zero
    • zdelet

      public static int zdelet(int[] ifltab, String pathname)
      Marks a record as deleted in a DSS file. Record can be undeleted until the file is squeezed
      Parameters:
      ifltab - The file table of the DSS file
      pathname - The pathname of the record to delete
      Returns:
      0 on success, otherwise an error code that can decoded with zerrorDecode(int, int[], int[], int[], int[])
    • zdataType

      public static void zdataType(int[] ifltab, String pathname, int[] checkedNumber, int[] exists, stringContainer type, int[] dataType)
      Determines the type of record in a DSS file

      Data types returned are

      Numeric TypeText TypeDescription
      20LOCLocation
      90ARRArray (DSS 7 only)
      91Integer Array (DSS 6 only)
      92Float Array (DSS 6 only)
      93Double Array (DSS 6 Only)
      100RTSRegular-interval time series
      101RTPARegular-interval time series pattern
      102RTPRRegular-interval time series profile
      105RTDRegular-interval time series doubles
      107RTPDRegular-interval time series double profile
      110ITSIrregular-interval time series
      111ITPAIrregular-interval time series pattern
      112ITPRIrregular-interval time series profile
      115ITDIrregular-interval time series doubles
      117ITPDIrregular-interval time series double profile
      200PDPaired Data
      205PDDPaired Data doubles
      300TXTText Data
      310TTText Table
      400GUTGridded - Undefined grid with time
      401GUGridded - Undefined grid
      410GHTGridded - HRAP grid with time reference
      411GHGridded - HRAP grid
      420GATGridded - Albers with time reference
      421GAGridded - Albers
      430GSTGridded - SHG with time reference
      431GSGridded - SHG
      450Spatial - TIN (DSS 7 only)
      600Generic File
      610Image
      Parameters:
      ifltab - The file table of the DSS file
      pathname - The pathname to check the type of
      checkedNumber - Element 0 receives the data length of the record
      exists - Element 0 receives 0 if the record doesn't exist in the DSS file, otherwise non-zero
      type - Receives the text data type of the record
      dataType - Element 0 receives the numeric data type of the record
    • zdbmod

      public static void zdbmod(int[] ifltab, long address, long value, String characterValue, int useCharacterValue)
      Modifies a single word in a DSS file
      Parameters:
      ifltab - The file table of the DSS file
      address - The address of the word to modify in 4-byte words for DSS 6 and 8-byte words for DSS 7
      value - The value to set the word to if useCharacterValue is 0
      characterValue - The text value to set the word to if useCharacterValue is non-zero
      useCharacterValue -
      • 0 - use value to modify the word
      • non-zero - use characterValue to modify the word
    • zfilst

      public static void zfilst(int[] ifltab)
      Prints status information of a DSS file to the message output
      Parameters:
      ifltab - The file table of the DSS file
    • zgintl

      @Deprecated public static void zgintl(int[] interval, String ePart, int[] nvals, int[] status)
    • zgtrec

      public static void zgtrec(int[] ifltab, long address, int numberWords, int[] array)
      Reads a logical record from a DSS file into an integer buffer used indirectly by a DssVue debug tool
      Parameters:
      ifltab - The file table of the DSS file
      address - The address of the record to read
      numberWords - The number of ints (4-byte words) to read
      array - The buffer to read the record into
    • zget

      public static void zget(int[] ifltab, long address, int numberArray, long[] array)
      Reads a logical record from a DSS file into a long buffer
      Parameters:
      ifltab - The file table of the DSS file
      address - The address of the record to read
      numberArray - The number of longs (8-byte words) to read
      array - The buffer to read the record into
    • zincbk

      public static void zincbk(int[] block, int[] julian, int[] year, int[] month, int[] day)
      Increments a date by +/- 1 day, month, year, decade, or century.
      Parameters:
      block - Specifies how to increment the date
      • 1 or -1 to increment/decrement date by 1 day
      • 2 or -2 to increment/decrement date by 1 month
      • 3 or -3 to increment/decrement date by 1 year
      • 4 or -4 to increment/decrement date by 1 decade
      • 5 or -5 to increment/decrement date by 1 century
      julian - Element 0 receives incremented julian
      year - Element 0 specifies starting year and receives incremented year
      month - Element 0 specifies starting month and receives incremented month
      day - Element 0 specifies starting day and receives incremented day
    • zinqir

      public static void zinqir(int[] ifltab, String param, stringContainer alpha, int[] number)
      Queries a file parameter

      Usage is as follows:

      Parameter Version Description Alpha Number
      ABOR 6 Reports whether library will abort on fatal error "OFF" or "ON" 0 or 1
      CLEA 6 Sets error state (use " and 0 to clear). Use ERRO and STAT to retrieve New error message New error number
      COLL 6 Reports whether the file contains collection records "OFF" or "ON" 0 or 1
      CPDD 6 Reports and possibly fixes corrupted paired data records
      • INPUT
        • 0 report only
        • 1 try to fix
      • OUTPUT
        • >-1 number of records found and (maybe) fixed
        • < 0 if error finding/fixing records
      DEAD 6 Reports percentage of file that is dead space Dead space percentage
      DELE 6 Reports number of deleted records in file Number of deleted records
      ERRO 6 or 7 Reports the current error status Error message Error number
      FDAT 6 Reports the file creation date File creation date
      FLAG or QUAL 6 Reports whether last record read contained quality flags 0 or 1
      FSIZ 6 Reports the file size in words File size in words
      FVER 6 or 7 Reports the version of the DSS file Text version of file Numeric version of the file
      HSIZ 6 Reports the size of the hash table
      • 1 - tiny
      • 2 - extra small
      • 3 - small
      • 4 - medium
      • 5 - large
      • 6 - extra large
      • 7 - huge
      • 8 - extra huge
      • 9 - super
      LWDA 6 Reports the last written date of DSS file Last written date
      LWTI 6 Reports the last written time of DSS file Last written time
      MLVL or MLEV 6 Reports the global message level
      •  0 - none
      •  1 - critical
      •  2 - terse
      •  4 - general
      •  5 - user diagnostics
      • 11 - internal diagnostic
      • 13 - internal debug
      MULT 6 Reports Whether the DSS file is in multi user mode 0 or 1
      MUNI or MLFN 6 Reports Fortran unit number of message output The unit number
      NAME 6 or 7 Reports the name of the DSS file The file name
      NREC 6 Reports the number of records in the DSS file Number of records
      POIN 6 Reports the pointer efficiency of file in % The efficiency
      PREC 6 Reports the data precision for data compression of the last record read
      • -6 - .000001
      • -5 - .00001
      • -4 - .0001
      • -3 - .001
      • -2 - .01
      • -1 - .1
      •  0 - 1
      •  1 - 10
      •  2 - 100
      •  3 - 1000
      •  4 - 10000
      •  5 - 100000
      •  6 - 1000000
      PROG 6 or 7 Reports the name of the program that wrote the last record read The program name
      QPRO 6 Reports whether protection bit in quality flags is observed "OFF" or "ON" 0 or 1
      RDAT 6 Reports the last written date of last record read The last written date
      READ 6 or 7 Reports whether access to file is read only "OFF" or "ON" 0 or 1
      REMO 6 Reports whether DSS file is remote "OFF" or "ON" 0 or 1
      RTIM 6 Reports the last written time of last record read The last written time
      RVER 6 or 7 Reports the version number of last record read The version number
      SIZE 6 Reports the file size in KB The file size
      SQUE 6 Reports whether file needs to be squeezed 0 or 1
      STAT 6 or 7
      • DSS 6 - reports the status of last operation
      • DSS 7 - reports the severity of last operation
      • DSS 6 - the status
      • DSS 7 - the severity
        • 0 - SUCCESS
        • 1 - INFORMATION
        • 2 - WARNING
        • 3 - INVALID_ARGUMENT
        • 4 - WARNING_NO_WRITE_ACCESS
        • 5 - WARNING_NO_FILE_ACCESS
        • 6 - WRITE_ERROR
        • 7 - READ_ERROR
        • 8 - CORRUPT_FILE
        • 9 - MEMORY_ERROR
      SWAP 6 Reports whether the current hardware big endian (must swap words) "OFF" or "ON" 0 or 1
      TABL 6 Reports the type of hash table "STABLE" or "DYNAMIC" 0 or 1
      TAG 6 Reports the tag of last record read The tag
      TYPE 6 or 7 Reports the data type of last record read
      • LOC  - location (DSS 7 only)
      • ARR  - array (DSS 7 only)
      • RTS  - regular-interval time series
      • RTPA - regular-interval time series pattern
      • RTPR - regular-interval time series profile
      • RTD  - regular-interval time series doubles
      • RTPD - regular-interval time series double profile
      • ITS  - irregular-interval time series
      • ITPA - irregular-interval time series pattern
      • ITPR - irregular-interval time series profile
      • ITD  - irregular-interval time series doubles
      • ITPD - irregular-interval time series double profile
      • PD   - paired data
      • PDD  - paired data doubles
      • TXT  - text data
      • TT   - text table
      • UDF  - other (DSS 7 only)
      • UND  - other (DSS 6 only)
      •  20 - location
      •  90 - array (DSS 7 only)
      •  91 - integer array (DSS 6 only)
      •  92 - float array (DSS 6 only)
      •  93 - double array (DSS 6 Only)
      • 100 - regular-interval time series
      • 101 - regular-interval time series pattern
      • 102 - regular-interval time series profile
      • 105 - regular-interval time series doubles
      • 107 - regular-interval time series double profile
      • 110 - irregular-interval time series
      • 111 - irregular-interval time series pattern
      • 112 - irregular-interval time series profile
      • 115 - irregular-interval time series doubles
      • 117 - irregular-interval time series double profile
      • 200 - paired data
      • 205 - paired data doubles
      • 300 - text data
      • 310 - text table
      • 400 - gridded - undefined grid with time
      • 401 - gridded - undefined grid
      • 410 - gridded - HRAP grid with time reference
      • 411 - gridded - HRAP grid
      • 420 - gridded - Albers with time reference
      • 421 - gridded - Albers
      • 430 - gridded - SHG with time reference
      • 431 - gridded - SHG
      • 450 - spatial - TIN (DSS 7 only)
      • 600 - generic file
      • 610 - image
      UNIT 6 Reports the Fortran unit number of DSS File The unit number
      VDTM 6 or 7 Reports the default native vertical datum Text value of default native vertical datum:
      • "UNSET"
      • "NAVD-88"
      • "NGVD-29"
      • "OTHER"
      "
      Numeric value of default native vertical datum:
      1. UNSET
      2. NAVD-88
      3. NGVD-29
      4. OTHER
      VDOW 7 Reports whether incoming native vertical datum can overwrite the location record's native vertical datum 0 or 1
      VERS 6 or 7 Reports the library version Text version of the library Numeric version of the library
      ZONE 6 Reports the time zone of last record read The time zone The time zone offset (minutes or seconds?)
      80CO 6 Reports whether in 80 column output mode "OFF" or "ON" 0 or 1

      Parameters:
      ifltab - The file table of the DSS file
      param - The parameter to inquire about
      alpha - Receives the text value of the parameter, if applicable
      number - Element 0 receives the integer value of the parameter, if applicable
      See Also:
    • zirbeg

      @Deprecated public static void zirbeg(int[] ifltab, int julian, String ePart, int[] year, int[] month, int[] day, int[] block, int[] minutesInBlock, int[] incrementBlock)
    • zmaxpart

      public static void zmaxpart(int[] ifltab, int[] maxpart)
      Retrieves the maximum part length for each pathname part
      Parameters:
      ifltab - The file table of the DSS file
      maxpart - Receives the maximum part length for each part
      • Element 0 receives the A part maximum length
      • Element 1 receives the B part maximum length
      • Element 2 receives the C part maximum length
      • Element 3 receives the D part maximum length
      • Element 4 receives the E part maximum length
      • Element 5 receives the F part maximum length
    • zofset

      @Deprecated public static void zofset(int[] julian, int[] minutes, int interval, int flag, int[] offset)
    • zopen

      public static void zopen(int[] ifltab, String name, int[] status)
      Opens a DSS file.
      Parameters:
      ifltab - The file table for the DSS file. Must be an integer array of at least 800 elements
      name - The name of the DSS file to open
      status - Element 0 receives 0 on success, non-zero otherwise
    • zquery

      public static void zquery(String param, stringContainer alpha, int[] number)
      Queries a library parameter

      Usage is as follows:

      Parameter Version Description Alpha Number
      ABOR 6 Reports whether library will abort on fatal error "OFF" or "ON" 0 or 1
      ALLV 6 or 7 Reports the default version for new DSS files opened 6 or 7
      CURR 6 or 7 Reports the current item number of an in-progress multi-item operation The current item number
      DATE 7 Reports the library version date The library major version number The library version date
      DSSV 6 or 7 Reports the version for the next new DSS file opened 6 or 7
      EMPT 6 or 7 Reports whether a squeeze of file copy will copy empty records "OFF" or "ON" (DSS 6 only) 0 or 1
      ERRO 6 or 7 Reports the current error status Error message Error number
      INTE 7 Reports whether an in-progress multi-item operation has been marked as interrupted 0 or 1
      MAXE 6 or 7 Reports the maximum number errors allowed for an in-progress multi-item operation The maximum number of errors allowed
      MLVL or MLEV 6 or 7 Reports the global message level
      •  0 - none
      •  1 - critical
      •  2 - terse
      •  4 - general
      •  5 - user diagnostics
      • 11 - internal diagnostic
      • 13 - internal debug
      MUNI or MLFN 6 or 7 Reports Fortran unit number of message output. MLFN variant DSS 6 only. The unit number
      NERR 6 or 7 Reports the number errors encountered in an in-progress multi-item operation The number of errors encountered
      PROG 6 Reports the name of the program that will wrie the next record The program name
      SQUE 6 Reports whether a squeeze is peformed when requested, even if it's not necessary "OFF" or "ON" 0 or 1
      TAG 6 Reports the tag of last record accessed The tag
      TOTA 6 or 7 Reports the total number of items of an in-progress multi-item operation The number total number of items
      VDTM 7 Reports the default native vertical datum Text value of default native vertical datum:
      • "UNSET"
      • "NAVD-88"
      • "NGVD-29"
      • "OTHER"
      Numeric value of default native vertical datum:
      1. UNSET
      2. NAVD-88
      3. NGVD-29
      4. OTHER
      VDOW 7 Reports whether incoming native vertical datum can overwrite the location record's native vertical datum 0 or 1
      VERS 6 or 7 Reports the library version Text version of the library Numeric version of the library
      80CO 6 Reports whether in 80 column output mode "OFF" or "ON" 0 or 1

      Parameters:
      param - The parameter to inquire about
      alpha - Receives the text value of the parameter, if applicable
      number - Element 0 receives the integer value of the parameter, if applicable
      See Also:
    • zreadxBytes

      public static void zreadxBytes(int[] ifltab, String pathname, int[] intheader, int kintheader, int[] nintheader, int[] compheader, int kcompheader, int[] ncompheader, int[] userheader, int kuserheader, int[] nuserheader, byte[] data, int kdata, int[] ndata, int plan, int[] found)
      Reads a single record using 1-byte array elements for data. Information returned includes:
      • Record data
      • User header
      • Internal header
      • compression header
      This method should not be used to read data that follows standard DSS conventions.
      Parameters:
      ifltab - The file table of the DSS File.
      pathname - Specifies the pathname to read
      intheader - Receives the internal header array up to kintheader
      kintheader - Specifies the maximum (allocated) size of intheader
      nintheader - Element 0 receives the number of elements returned in intheader
      compheader - Receives the compression header array up to kcompheader
      kcompheader - Specifies the maximum (allocated) size of compheader
      ncompheader - Element 0 receives the number of elements returned in compheader
      userheader - Receives the user header array up to kuserheader
      kuserheader - Specifies the maximum (allocated) size of userheader
      nuserheader - Element 0 receives the number of elements returned in userheader
      data - Receives the record data array up to kdata
      kdata - Specifies the maximum (allocated) size of data
      ndata - Element 0 receives the number of elements returned in data
      plan - Must be set to 0
      found - Element 0 receives 0 if the record was not found, otherwise 0
    • zrenam

      public static int zrenam(int[] ifltab, String pathname, String newPathname)
      Renames a record
      Parameters:
      ifltab - The file table of the DSS file
      pathname - The existing record pathname
      newPathname - The new pathname for the record
      Returns:
      0 on success, non-zero if the existing record was not found
    • zset

      public static void zset(String parameter, String alpha, int number)
      Sets a library parameter

      Usage is as follows:

      Parameter Version Description Alpha Number
      ABOR 6 Sets whether library will abort on fatal error "OFF" or "ON"
      ALLV 6 or 7 Sets the default version for new DSS files opened 6 or 7
      CAST 6 Sets whether to show status when generating catalog "OFF" or "ON"
      CCDA 6 Sets whether to exclude missing periods from condensed catalogs "OFF" or "ON"
      CLEA 7 Clears error number and message
      COLL 7 Sets whether to expect collection records in new file
      COMP 6 Sets whether to compress time series records when copying or squeezing "OFF" or "ON"
      CURR 6 or 7 Sets the current item number of an in-progress multi-item operation The current item number
      DCDB 6 Sets whether data compression debug is turned on "OFF" or "ON" The unit number of the data compression debug output
      DSSV 6 or 7 Sets the version for the next new DSS file opened 6 or 7
      EMPT 6 or 7 Sets whether a squeeze of file copy will copy empty records "OFF" or "ON"
      FDAT 6 Sets the file creation date (for squeeze only) File creation date
      FLAG or QUAL 6 Sets whether to write quality flags 0 or 1
      HAND 6 Sets whether to display the file handle rather than the unit number "OFF" or "ON"
      HSIZ 6 Sets the size of the hash table for squeezing the DSS file
      • 1 - tiny
      • 2 - extra small
      • 3 - small
      • 4 - medium
      • 5 - large
      • 6 - extra large
      • 7 - huge
      • 8 - extra huge
      • 9 - super
      INTE 6 or 7 Sets whether an in-progress multi-item operation is marked as interrupted 0 or 1
      MAPU 6 Sets the Fortran unit number to write the catalog map to The unit number
      MAXE 6 or 7 Sets the maximum number errors allowed for an multi-item operation The maximum number of errors allowed
      MAXP 7 Sets the maximum number of pathnames expected The maximum number of pathnames expected
      MHAN 7 Sets the message output handle The handle of the message output device
      MLVL, MLEV, or MESS 6 or 7 Sets the global message level. MESS is DSS 7 only
      •  0 - none
      •  1 - critical
      •  2 - terse
      •  4 - general
      •  5 - user diagnostics
      • 11 - internal diagnostic
      • 13 - internal debug
      MULT 6 Sets the current DSS file into multi user mode
      MUNI or MLFN 6 or 7 Sets the Fortran unit number of message output. MLFN is DSS 6 only The unit number
      NERR 6 or 7 Sets the number errors encountered in an in-progress multi-item operation The number of errors encountered
      PREC 6 Sets the data precision for data compression methods "OFF" to disable
      • -6 - .000001
      • -5 - .00001
      • -4 - .0001
      • -3 - .001
      • -2 - .01
      • -1 - .1
      •  0 - 1
      •  1 - 10
      •  2 - 100
      •  3 - 1000
      •  4 - 10000
      •  5 - 100000
      •  6 - 1000000
      PROG or PRGN 6 or 7 Sets the name of the program that will write the next record. PRGN is DSS 6 only The program name
      PROT 6 Sets whether to overwrite existing records "OFF" or "ON"
      PSEU 6 Sets the pseudo regular interval for the next record written "OFF" or "ON" The interval in minutes
      QPRO 6 Sets whether protection bit in quality flags is observed "OFF" or "ON"
      RDAT 6 Sets the last written date of next record written The record date
      READ 6 Sets whether access to file is read only "OFF" or "ON"
      RTIM 6 Sets the last written time of next record written The record time
      RVER 6 Sets the version number for the next record written The version number
      SIZE 6 Sets the estimated file size for new file The file size
      SQUE 6 Sets whether a squeeze is peformed when requested, even if it's not necessary "OFF" or "ON"
      SQST 6 Sets whether to show status when squeezing file "OFF" or "ON"
      TABL 6 Sets the type of hash table "STABLE" or "DYNAMIC"
      TOL 6 Sets the tolerance for replacing existing values "OFF" to turn off tolerance checking The difference above which two values are considered different enough for replacement
      TOTA 6 or 7 Sets the total number of items for an multi-item operation The number total number of items
      TWCA 6 Sets whether to use the time window as a selection criterion when generating a catalog "OFF" or "ON"
      TYPE 6 Sets the data type for data to be written
      •  20 - location
      •  90 - array (DSS 7 only)
      •  91 - integer array (DSS 6 only)
      •  92 - float array (DSS 6 only)
      •  93 - double array (DSS 6 Only)
      • 100 - regular-interval time series
      • 101 - regular-interval time series pattern
      • 102 - regular-interval time series profile
      • 105 - regular-interval time series doubles
      • 107 - regular-interval time series double profile
      • 110 - irregular-interval time series
      • 111 - irregular-interval time series pattern
      • 112 - irregular-interval time series profile
      • 115 - irregular-interval time series doubles
      • 117 - irregular-interval time series double profile
      • 200 - paired data
      • 205 - paired data doubles
      • 300 - text data
      • 310 - text table
      • 400 - gridded - undefined grid with time
      • 401 - gridded - undefined grid
      • 410 - gridded - HRAP grid with time reference
      • 411 - gridded - HRAP grid
      • 420 - gridded - Albers with time reference
      • 421 - gridded - Albers
      • 430 - gridded - SHG with time reference
      • 431 - gridded - SHG
      • 450 - spatial - TIN (DSS 7 only)
      • 600 - generic file
      • 610 - image
      UNIT or FILN 6 Set the Fortran unit number of the next DSS File to open The unit number
      UPRT 6 Sets whether record times will be time of write instead the time the file was opened "OFF" or "ON"
      VDTM 6 or 7 Sets the default native vertical datum. Alpha takes precedence over number if both are specified Text value of default native vertical datum:
      • "UNSET"
      • "NAVD-88"
      • "NGVD-29"
      • "OTHER"
      Numeric value of default native vertical datum:
      1. UNSET
      2. NAVD-88
      3. NGVD-29
      4. OTHER
      VDOW 7 Sets whether incoming native vertical datum can overwrite the location record's native vertical datum 0 or 1
      ZONE 6 Sets the time zone of the next record to write The time zone name The time zone offset (minutes or seconds?)
      80CO 6 Sets whether in 80 column output mode "OFF" or "ON"

      Parameters:
      parameter - The parameter to set
      alpha - The text value of the parameter, if applicable
      number - The integer value of the parameter, if applicable
      See Also:
    • zsetfi

      public static void zsetfi(int[] ifltab, String parameter, String alpha, int number, int[] status)
      Sets a library parameter

      Usage is as follows:

      Parameter Version Description Alpha Number
      DETU 7 Detune file for testing purposes
      FMUL 6 Force file into multi-user access mode "ON" or "OFF"
      MAXP 7 Sets the maximum number of pathnames expected The maximum number of pathnames expected
      MFLU 7 Flushes the message output buffer
      MHAN 7 Sets the message output handle The message output handle
      MLVL or MLEV 7 Sets the global message level The message level
      MULT or ACCE 6 or 7 Sets file access mode. ACCE is DSS7 only
      • 0 - GENERAL - no errors if write without permission
      • 1 - READ - read-only
      • 2 - MULTI-USER - full read/write (slow but safe)
      • 3 - SINGLE-USER ADVISORY (default) - fast read/write, receives notification if another process wants access
      • 4 - EXCLUSIVE - single user only, used for squeezing
      MUNI 7 Sets the Fortran unit number of message output The Fortran unit number of message output
      NDAT 7 Sets logical number of data elements to set in info area The logical number of data elements to set in info area
      PSEU 6 Sets the pseudo regular interval for a specified record The pathname of the record to set The pseudo-regular interval for the records
      READ 7 Sets whether access to file is read only "ON" or "OFF"
      RECL 7 Sets reclaim space level The reclaim space level
      Parameters:
      ifltab - The file table of the DSS file
      parameter - The file parameter to set
      alpha - The text setting of the parameter, if appropriate
      number - The numeric setting of the parameter, if appropriate
      status - 0 on success, otherwise non-zero
      See Also:
    • ztsends

      public static void ztsends(int[] ifltab, String pathname, int searchOption, int[] startJulian, int[] startMinutes, int[] endJulian, int[] endMinutes, int[] lfound)
      Finds the time series extents of a dataset
      Parameters:
      ifltab - The file table of the DSS file
      pathname - The dataset name. The D part is ignored
      searchOption - The search extents
      • DSS 6
        •   0 - performs exhaustive search
        • > 0 - limit search to this many blocks each side of last found record. If pathname contains a D part and specifies a record with data, it will be the initial last record found. Otherwise the initial last record found will be the first record in the dataset, if any
      • DSS 7 - not used
      startJulian - Element 0 receives the number of days since 31Dec1899 of the first value found (if lfound[0] != 0)
      startMinutes - Element 0 receives the number of minutes into startJulian[0] of the first value found (if lfound[0] != 0)
      endJulian - Element 0 receives the number of days since 31Dec1899 of the last value found (if lfound[0] != 0)
      endMinutes - Element 0 receives the number of minutes into endJulian[0] of the last value found (if lfound[0] != 0)
      lfound - Element 0 receives 0 if no time series values were found, otherwise non-zero. If zero, all other output variables are undefined
    • zundel

      public static int zundel(int[] ifltab, String pathname)
      Undeletes a record
      Parameters:
      ifltab - The file table of the DSS file
      pathname - The pathname of the record to undelete
      Returns:
      The status
      •  0 - success
      • -1 - the deleted record couldn't be found
      • -2 - an non-deleted record already exist with that pathname
      • -3 - other error
    • zwritxBytes

      public static void zwritxBytes(int[] ifltab, String pathname, int nPathname, int[] intheader, int nintheader, int[] compheader, int ncompheader, int[] userheader, int nuserheader, byte[] data, int ndata, int type, int plan, int[] status, int[] found)
      Stores arbitrary data values specified as bytes to a DSS record.
      Parameters:
      ifltab - The file table of the DSS file
      pathname - The pathname of the record to store
      nPathname - The number of characters in pathname
      intheader - The record internal header. Must have at least nintheader elements
      nintheader - The number of elements in intheader to store
      compheader - The record compression header. Must have at least ncompheader elements
      ncompheader - The number of elements in compheader to store
      userheader - The record user header. Must have at least nuserheader elements
      nuserheader - The number of elements in userheader to store
      data - The values to store. Must have at least ndata elements
      ndata - The number of values to store
      type - The record type
      •  20 - location
      •  90 - array (DSS 7 only)
      •  91 - integer array (DSS 6 only)
      •  92 - float array (DSS 6 only)
      •  93 - double array (DSS 6 Only)
      • 100 - regular-interval time series
      • 101 - regular-interval time series pattern
      • 102 - regular-interval time series profile
      • 105 - regular-interval time series doubles
      • 107 - regular-interval time series double profile
      • 110 - irregular-interval time series
      • 111 - irregular-interval time series pattern
      • 112 - irregular-interval time series profile
      • 115 - irregular-interval time series doubles
      • 117 - irregular-interval time series double profile
      • 200 - paired data
      • 205 - paired data doubles
      • 300 - text data
      • 310 - text table
      • 400 - gridded - undefined grid with time
      • 401 - gridded - undefined grid
      • 410 - gridded - HRAP grid with time reference
      • 411 - gridded - HRAP grid
      • 420 - gridded - Albers with time reference
      • 421 - gridded - Albers
      • 430 - gridded - SHG with time reference
      • 431 - gridded - SHG
      • 450 - spatial - TIN (DSS 7 only)
      • 600 - generic file
      • 610 - image
      plan - The data storage plan
      • 0 - always store the record
      • 1 - only store the record if no record exists with the pathname
      • 2 - only store the record if a record already exists with the pathname
      status - Element 0 receives the status
      •   0 - success
      •  -1 - plan was 2 but no record existed with the pathname
      •  -2 - plan was 1 but a record existed with the pathname
      • -10 - invalid pathname
      • -11 - invalid number of values
      • -12 - file is in read-only mode
      found - Element 0 receives 0 if an existing record with the pathname was not found, otherwise 0
    • zmessage

      public static void zmessage(int[] ifltab, String message)
      Outputs a message
      Parameters:
      ifltab - The file table of the DSS file
      message - The message to output