Module ibm.jzos
Package com.ibm.jzos

Class CatalogSearch.Entry

java.lang.Object
com.ibm.jzos.CatalogSearch.Entry
Enclosing class:
CatalogSearch

public static class CatalogSearch.Entry extends Object
A static nested class of CatalogSearch which holds a catalog search entry. Entry types are either Catalog or Dataset. Catalog entries only contain a Catalog name, while Dataset entries contain the dataset name and the requested field data.
See Also:
  • Method Details

    • isCatalogEntry

      public boolean isCatalogEntry()
      Return true if this entry is a Catalog entry.
    • isDatasetEntry

      public boolean isDatasetEntry()
      Return true if this entry is a Dataset entry.
    • hasError

      public boolean hasError()
      Return true if the entry has an error. If so, the methods getRc() and getReason() can be used to determine what the error is.
    • getRc

      public int getRc()
      Return the entry reason area return code. Will be zero if hasError() is false.
    • getReason

      public int getReason()
      Return the entry reason area reason code. Will be zero if hasError() is false.
    • getModuleId

      public String getModuleId()
      Return the entry reason area module id. Will be a zero length string if hasError() is false.
    • hasReasonArea

      public boolean hasReasonArea()
      Return true if the entry has a valid reason area. All catalog entries have a reason area; dataset entries have a reason area if in error (FLAG_CSIENTER != 0).
      Returns:
      true if the entry has a valid reason area.
    • getEntryLength

      public int getEntryLength()
      Return the total length, in bytes, that this entry comprises in the work area.

      Each entry has the following common information:

      • CSIFLAG[1]
      • CSITYPE[1]
      • CSIxNAME[44]
      If the entry is a Catalog entry or Dataset Entry that has an error, the following additional information will be present:
      • CSIxRETM[2]
      • CSIxRETR[1]
      • CSIxRETC[1]
      If the entry is a valid Dataset Entry, the above information will not be present, but a variable length field area (CSIEDATA) will be present.
      Returns:
      the length of the entry
    • getCatalogName

      public String getCatalogName()
      Return the name of the current Catalog (the entry name of the last Catalog entry read).
    • getFlag

      public byte getFlag()
      Return the entry flag byte.

      See See FLAG_* constants for possible values and consult the Catalog Search Interface documentation for details.

      Since:
      2.3.2
    • getType

      public char getType()
      Return the entry type.

      For catalogs, this value will be CatalogSearch.CATALOG_TYPE.

      For dataset entries, this value will be one of the entry types as described in CatalogSearch.setEntryTypes(String).

      Since:
      2.3.2
    • getName

      public String getName()
      Return a String containing the 1-44 character name (blanks trimmed)
    • getField

      public CatalogSearchField getField(String fieldName)
      Return the field data associated with a fieldName.
      Parameters:
      fieldName - one of the names added via CatalogSearch.addFieldName(String).
      Returns:
      the field data
      Throws:
      UnsupportedOperationException - if this method is called on a Catalog Entry
      NoSuchElementException - if the entry has no such field
      See Also: