com.ibm.dbb.build

Class AbstractExec

  • java.lang.Object
    • com.ibm.dbb.build.AbstractExec
  • All Implemented Interfaces:
    IExecute
    Direct Known Subclasses:
    AbstractCommandExec, MVSExec


    public abstract class AbstractExec
    extends java.lang.Object
    implements IExecute
    Abstract class that implements IExec to execute a command on system z.
    Since:
    1.0
    • Constructor Summary

      Constructors 
      Constructor and Description
      AbstractExec()
      Default constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      void addAllDDStatements(java.util.List<DDStatement> dds)
      Concatenates a list of DD statements to the list of DD statements for this command
      void addDDStatement(DDStatement dd)
      Add a DD statement that will be allocated prior to executing the program and freed once program execution has completed.
      void addDDStatement(java.lang.String ddName, java.lang.String dsn, java.lang.String options, boolean pass)
      Creates and adds a DD statement that will be allocated prior to executing the program and freed once program execution has completed.
      void addDDStatment(java.lang.String ddName, java.lang.String dsn, java.lang.String options, boolean pass)
      AbstractExec dd(DDStatement dd)
      Add a DD statement that will be allocated prior to executing the program and freed once program execution has completed.
      int execute()
      Executes the command
      java.util.List<DDStatement> getDDStatements()
      Retrieves the list of DD statements for this command
      java.lang.String getFile()
      Returns the relative path of the file that this command is processing.
      void setFile(java.lang.String file)
      Set the file that this command is processing.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractExec

        public AbstractExec()
        Default constructor
    • Method Detail

      • execute

        public final int execute()
                          throws BuildException
        Executes the command
        Specified by:
        execute in interface IExecute
        Returns:
        The integer RC from the z/OS executed program.
        Throws:
        BuildException - if an error occurs during the execution
      • addDDStatement

        public void addDDStatement(DDStatement dd)
                            throws BuildException
        Add a DD statement that will be allocated prior to executing the program and freed once program execution has completed.
        Parameters:
        dd - The DD statement to add.
        Throws:
        BuildException - an exception occurred
        See Also:
        DDStatement
      • addDDStatment

        public void addDDStatment(java.lang.String ddName,
                                  java.lang.String dsn,
                                  java.lang.String options,
                                  boolean pass)
                           throws BuildException
        Creates and adds a DD statement that will be allocated prior to executing the program and freed once program execution has completed.
        Parameters:
        ddName - The name of the DD statement to add. Required.
        dsn - The dataset name of the DD statement to add. Optional if the DD statement is for a temporary dataset.
        options - BPXWDYN allocation options. Required. See BPXWDYN: Dynamic Allocation
        pass - True if the DD is to be passed to another MVSExec statement so is not freed at. Optional, default is false.
        Throws:
        BuildException - an exception occurred
        See Also:
        DDStatement
      • addDDStatement

        public void addDDStatement(java.lang.String ddName,
                                   java.lang.String dsn,
                                   java.lang.String options,
                                   boolean pass)
                            throws BuildException
        Creates and adds a DD statement that will be allocated prior to executing the program and freed once program execution has completed.
        Parameters:
        ddName - The name of the DD statement to add. Required.
        dsn - The dataset name of the DD statement to add. Optional if the DD statement is for a temporary dataset.
        options - BPXWDYN allocation options. Required. See BPXWDYN: Dynamic Allocation
        pass - True if the DD is to be passed to another MVSExec statement so is not freed at. Optional, default is false.
        Throws:
        BuildException - an exception occurred
        See Also:
        DDStatement
      • addAllDDStatements

        public void addAllDDStatements(java.util.List<DDStatement> dds)
                                throws BuildException
        Concatenates a list of DD statements to the list of DD statements for this command
        Parameters:
        dds - List of DD statements
        Throws:
        BuildException - an exception occurred
        See Also:
        DDStatement
      • getDDStatements

        public java.util.List<DDStatement> getDDStatements()
        Retrieves the list of DD statements for this command
        Returns:
        List of DD statements
        See Also:
        DDStatement
      • setFile

        public void setFile(java.lang.String file)
        Set the file that this command is processing.
        Parameters:
        file - the relative path of the file.
      • getFile

        public java.lang.String getFile()
        Returns the relative path of the file that this command is processing.
        Returns:
        the relative path of the file.
      • dd

        public AbstractExec dd(DDStatement dd)
                        throws BuildException
        Add a DD statement that will be allocated prior to executing the program and freed once program execution has completed.
        Parameters:
        dd - The DD statement to add.
        Returns:
        this instance
        Throws:
        BuildException - an exception occurred
        See Also:
        DDStatement

<IBM Copyright © 2018 IBM Corp. All Rights Reserved.