com.ibm.as400.access

Class DecimalDataArea

  • All Implemented Interfaces:
    Serializable


    public class DecimalDataArea
    extends DataArea
    implements Serializable
    The DecimalDataArea class represents a decimal data area on the system.

    The following example demonstrates the use of DecimalDataArea:

    // Prepare to work with the system named "My400".
    AS400 system = new AS400("My400");
    
    // Create a DecimalDataArea object.
    QSYSObjectPathName path = new QSYSObjectPathName("MYLIB", "MYDATA", "DTAARA");
    DecimalDataArea dataArea = new DecimalDataArea(system, path.getPath());
    
    // Create the decimal data area on the system using default values.
    dataArea.create();
    
    // Clear the data area.
    dataArea.clear();
    
    // Write to the data area.
    dataArea.write(new BigDecimal("1.2"));
    
    // Read from the data area.
    BigDecimal data = dataArea.read();
    
    // Delete the data area from the system.
    dataArea.delete();
    
    See Also:
    Serialized Form