com.ibm.ctg.client

Interface Container



  • public interface Container
    A container is a uniquely named block of data that can be passed to a subsequent program or transaction. It refers to a particular parameter data structure that exists within a collection of virtually any form of application parameter data.

    You can choose a container name which has a meaningful representation of the data structure. For example, in a human resource application, the container name might be <employee-name>

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface and Description
      static class  Container.ContainerType
      Defines the type of data in a Container and whether it is subject to code page conversion.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      byte[] getBITData()
      Gets binary data from a BIT container.
      int getCCSID()
      Returns the CCSID of the data in the container.
      java.lang.String getCHARData()
      Gets character data from a CHAR container.
      java.lang.String getName()
      Gets the name of the container
      Container.ContainerType getType()
      Gets the ContainerType of the container.
      boolean isCicsContainer()
      Gets a value indicating whether the container was created by CICS.
      boolean isReadOnly()
      Gets a value indicating whether the container was marked as read-only by CICS.
      void setBITData(byte[] data)
      Puts binary data into a BIT container.
      void setCHARData(java.lang.String data)
      Puts character data into a CHAR container.
    • Method Detail

      • getName

        java.lang.String getName()
        Gets the name of the container
        Returns:
        the name of the container
      • getType

        Container.ContainerType getType()
        Gets the ContainerType of the container.

        Containers are one of two types. A BIT container is a block of binary data, much like a COMMAREA. There is no automatic code page conversion of the data.

        A CHAR container has an associated code page. When the data in the container is read, it is automatically converted from the container code page to the code page of the platform.

        Returns:
        the type of the container.
        See Also:
        Container.ContainerType
      • getCCSID

        int getCCSID()
        Returns the CCSID of the data in the container. If the container type is CHAR, automatic code page conversion occurs when the data is the container is modified or accessed. If the container type is BIT, no code page conversion occurs and the CCSID is ignored.
        Returns:
        the CCSID of the data in the container
        See Also:
        Container.ContainerType
      • isReadOnly

        boolean isReadOnly()
        Gets a value indicating whether the container was marked as read-only by CICS. If true, this implies that isCicsContainer is also true.

        User programs cannot create read-only containers.

        Returns:
        true if the container is marked as read-only; false otherwise.
      • isCicsContainer

        boolean isCicsContainer()
        Gets a value indicating whether the container was created by CICS.
        Returns:
        true if the container was created by CICS; false otherwise.
      • getBITData

        byte[] getBITData()
                          throws ContainerException
        Gets binary data from a BIT container.
        Returns:
        the data held in the container.
        Throws:
        ContainerException - if the container type is not BIT or the container has been deleted.
      • setBITData

        void setBITData(byte[] data)
                        throws ContainerException
        Puts binary data into a BIT container.
        Parameters:
        data - the data to put into the container.
        Throws:
        ContainerException - if the container type is not BIT, or the container is read-only.
      • getCHARData

        java.lang.String getCHARData()
                                     throws ContainerException,
                                            java.io.UnsupportedEncodingException
        Gets character data from a CHAR container. Data is automatically converted from the code page of the container.
        Returns:
        the data held in the container.
        Throws:
        ContainerException - if the container type is not CHAR or the container has been deleted.
        java.io.UnsupportedEncodingException - if code page conversion of the container data cannot be completed.
      • setCHARData

        void setCHARData(java.lang.String data)
                         throws ContainerException
        Puts character data into a CHAR container. Data is automatically converted to the code page of the container.
        Parameters:
        data - the data to put into the container.
        Throws:
        ContainerException - if the container type is not CHAR, or the container is read-only.
©Copyright IBM Corp. 1994, 2013
Legal