Class CharacterDataArea

  • All Implemented Interfaces:

    public class CharacterDataArea
    extends DataArea
    implements Serializable
    The CharacterDataArea class represents a character data area on the system.

    The following example demonstrates the use of CharacterDataArea:

    // Prepare to work with the system named "My400".
    AS400 system = new AS400("My400");
    // Create a CharacterDataArea object.
    QSYSObjectPathName path = new QSYSObjectPathName("MYLIB", "MYDATA", "DTAARA");
    CharacterDataArea dataArea = new CharacterDataArea(system, path.getPath());
    // Create the character data area on the system using default values.
    // Clear the data area.
    // Write to the data area.
    dataArea.write("Hello world");
    // Read from the data area.
    String data =;
    // Delete the data area from the system.

    Note: Most of the read() and write() methods of this class automatically convert characters between Unicode and the CCSID associated with the AS400 object. See AS400.getCcsid().

    See Also:
    Serialized Form