Class DfSortArguments

java.lang.Object
com.ibm.jzos.sample.dfsort.DfSortArguments

public class DfSortArguments extends Object
Helper class for parsing key=value pair arguments into a usable form for the DFSORT sample programs.

An instance of DfSortArguments is constructed with the String[] arguments in the form <parm=value>, as provided to one of the DFSORT sample classes in this package. It will parse and provide accessors the following information:

  • DsInfo getSortinDataset() from: "sortin=dsn"
  • DsInfo getSortoutDataset() from: "sortout=dsn"
  • boolean isSameAddressSpace() from: "shareas=yes/no"
  • String getEncoding() from: encoding=value
  • int getLrecl() from: lrecl=nnn
  • int getNumrecs() from: numrecs=mmm
  • int getLogLevel() from: loglevel=n
  • Constructor Details

    • DfSortArguments

      public DfSortArguments(String[] args) throws ZFileException
      Construct and parse a list of arguments as described by the class description.
      Parameters:
      args - an array of key=value arguments
      Throws:
      ZFileException - if a dataset cannot be opened
  • Method Details

    • getSortinDataset

      public DsInfo getSortinDataset()
      Answer a description of the sortin dataset. Answers null if not supplied.
      Returns:
      DsInfo
    • getSortoutDataset

      public DsInfo getSortoutDataset()
      Answer a description of the sortout dataset. Answers null if not supplied.
      Returns:
      DsInfo
    • isSameAddressSpace

      public boolean isSameAddressSpace()
      Answer true if DFSORT should be spawned in the same address space. Answers false by default.
      Returns:
      boolean
    • getEncoding

      public String getEncoding()
      Answer an encoding name for encoding/decoding logical records. Answers null if not supplied.
      Returns:
      String
    • getLrecl

      public int getLrecl()
      Answer the LRECL used for the sample. Answers -1 if not supplied.
      Returns:
      int
    • getNumrecs

      public int getNumrecs()
      Answer the number of records to be used/generated by the sample. Answers -1 if not supplied.
      Returns:
      int
    • getLogLevel

      public int getLogLevel()
      Answer the logging level to use for the child process. Answers -1 if not supplied.
      Returns:
      int