com.ibm.jtopenlite.command.program.object

Class CreateUserSpace

  • java.lang.Object
    • com.ibm.jtopenlite.command.program.object.CreateUserSpace
  • All Implemented Interfaces:
    Program


    public class CreateUserSpace
    extends java.lang.Object
    implements Program

    Call the QUSCRTUS API, QUSCRTUS

    This class is used with a CommandConnection to create a user space

    Sample code

     public static void main(String[] args) {
       try { 
         CommandConnection connection = CommandConnection.getConnection(args[0],  args[1],  args[2]);
         CreateUserSpace createUserSpace = new CreateUserSpace(
                           args[4], // userSpaceName 
                           args[3], // userSpaceLibrary 
                           CreateUserSpace.EXTENDED_ATTRIBUTE_NONE,      // extendedAttribute 
                           100,     // initialSize       
                           CreateUserSpace.INITIAL_VALUE_BEST_PERFORMANCE, // initialValue 
                           CreateUserSpace.PUBLIC_AUTHORITY_USE, // publicAuthority 
                           "", //textDescription 
                           CreateUserSpace.REPLACE_NO,  //replace 
                           CreateUserSpace.DOMAIN_DEFAULT, //domain 
                           CreateUserSpace.TRANSFER_SIZE_REQUEST_DEFAULT, //transferSizeRequest 
                           CreateUserSpace.OPTIMUM_SPACE_ALIGNMENT_YES // optimumSpaceAlignment 
                        );
    
         CommandResult result = connection.call(createUserSpace); 
         System.out.println("Command completed with "+result); 
       } catch (Exception e) {
         e.printStackTrace(System.out); 
       }
    }
    
     
    • Constructor Detail

      • CreateUserSpace

        public CreateUserSpace(java.lang.String userSpaceName,
                       java.lang.String userSpaceLibrary,
                       java.lang.String extendedAttribute,
                       int initialSize,
                       byte initialValue,
                       java.lang.String publicAuthority,
                       java.lang.String textDescription,
                       java.lang.String replace,
                       java.lang.String domain,
                       int transferSizeRequest,
                       java.lang.String optimumSpaceAlignment)
    • Method Detail

      • getUserSpaceName

        public java.lang.String getUserSpaceName()
      • setUserSpaceName

        public void setUserSpaceName(java.lang.String name)
      • getUserSpaceLibrary

        public java.lang.String getUserSpaceLibrary()
      • setUserSpaceLibrary

        public void setUserSpaceLibrary(java.lang.String lib)
      • getInitialSize

        public int getInitialSize()
      • setInitialSize

        public void setInitialSize(int size)
      • getInitialValue

        public byte getInitialValue()
      • setInitialValue

        public void setInitialValue(byte val)
      • getPublicAuthority

        public java.lang.String getPublicAuthority()
      • setPublicAuthority

        public void setPublicAuthority(java.lang.String auth)
      • getTextDescription

        public java.lang.String getTextDescription()
      • setTextDescription

        public void setTextDescription(java.lang.String text)
      • getReplace

        public java.lang.String getReplace()
      • setReplace

        public void setReplace(java.lang.String replace)
      • getDomain

        public java.lang.String getDomain()
      • setDomain

        public void setDomain(java.lang.String domain)
      • getTransferSizeRequest

        public int getTransferSizeRequest()
      • setTransferSizeRequest

        public void setTransferSizeRequest(int size)
      • getOptimumSpaceAlignment

        public java.lang.String getOptimumSpaceAlignment()
      • setOptimumSpaceAlignment

        public void setOptimumSpaceAlignment(java.lang.String align)
      • newCall

        public void newCall()
        Description copied from interface: Program
        Invoked before any other methods on this interface by CommandConnection whenever this Program is called.
        Specified by:
        newCall in interface Program
      • getNumberOfParameters

        public int getNumberOfParameters()
        Description copied from interface: Program
        Returns the number of parameters for this program.
        Specified by:
        getNumberOfParameters in interface Program
      • getParameterInputLength

        public int getParameterInputLength(int parmIndex)
        Description copied from interface: Program
        Returns the input length of the parameter at the specified index.
        Specified by:
        getParameterInputLength in interface Program
      • getParameterOutputLength

        public int getParameterOutputLength(int parmIndex)
        Description copied from interface: Program
        Returns the output length of the parameter at the specified index.
        Specified by:
        getParameterOutputLength in interface Program
      • getParameterType

        public int getParameterType(int parmIndex)
        Description copied from interface: Program
        Returns the type of parameter at the specified index.
        Specified by:
        getParameterType in interface Program
        See Also:
        Parameter
      • getParameterInputData

        public byte[] getParameterInputData(int parmIndex)
        Description copied from interface: Program
        Returns the input data of the parameter at the specified index.
        Specified by:
        getParameterInputData in interface Program
      • getTempDataBuffer

        public byte[] getTempDataBuffer()
        Description copied from interface: Program
        The implementor can create their own temp byte array for the output parameter size and reuse it each time a call is performed, or for more than one parameter on the same call. The implementor can choose to ignore this, and simply return null. The command connection checks to see if the buffer returned by this method is not null and large enough to accommodate the output parameter size.
        Specified by:
        getTempDataBuffer in interface Program
      • setParameterOutputData

        public void setParameterOutputData(int parmIndex,
                                  byte[] tempData,
                                  int maxLength)
        Description copied from interface: Program
        Sets the output data for the parameter at the specified index.
        Specified by:
        setParameterOutputData in interface Program
      • getProgramName

        public java.lang.String getProgramName()
        Description copied from interface: Program
        Returns the name of the program object.
        Specified by:
        getProgramName in interface Program
      • getProgramLibrary

        public java.lang.String getProgramLibrary()
        Description copied from interface: Program
        Returns the library of the program object.
        Specified by:
        getProgramLibrary in interface Program