com.ibm.as400.access

Class LogicalDataArea

  • All Implemented Interfaces:
    java.io.Serializable


    public class LogicalDataArea
    extends DataArea
    implements java.io.Serializable
    The LogicalDataArea class represents a logical data area on the system.

    The following example demonstrates the use of LogicalDataArea:

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

      • LogicalDataArea

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

        public LogicalDataArea(AS400 system,
                       java.lang.String path)
        Constructs a LogicalDataArea object. It creates a LogicalDataArea 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