com.ibm.as400.access

Class DecimalDataArea

  • All Implemented Interfaces:
    java.io.Serializable


    public class DecimalDataArea
    extends DataArea
    implements java.io.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
    • Constructor Detail

      • DecimalDataArea

        public DecimalDataArea()
        Constructs a DecimalDataArea object. It creates a default DecimalDataArea object. The system and path properties must be set before attempting a connection.
      • DecimalDataArea

        public DecimalDataArea(AS400 system,
                       java.lang.String path)
        Constructs a DecimalDataArea object. It creates a DecimalDataArea instance that represents the data area path on system.
        Parameters:
        system - The system that contains the data area.
        path - The fully qualified integrated file system path name. The integrated file system file extension for a data area is DTAARA. An example of a fully qualified integrated file system path to a data area "MYDATA" in library "MYLIB" is: /QSYS.LIB/MYLIB.LIB/MYDATA.DTAARA