Io.read Method

Reads the next full record from the Io object.

Syntax

public container read()

Run On

Called

Return Value

Type: container
A container that holds the next full record from the Io object.

Remarks

The definition of the next full record is controlled by the inFieldDelimiter, inRecordDelimiter, and inRecordLength method properties. The record is returned as a container. Each entry in the container equals one field in the record.

Each of the specialized Io classes has default settings for inFieldDelimiter, inRecordDelimiter, and inRecordLength enabling input and output of the most common formats. You might have to adjust these to support the wanted format.

Examples

This method demonstrates the use of the run method. However, the following example will not compile in a job as it must be run in the context of a class, form, or other object.

static void Job1(Args _args) 
{ 
    FileIoPermission _perm; 
    AsciiIo myfileio; 
    Container c; 
 
    _perm = new FileIoPermission("myfile.txt","r"); 
    myfileio = new AsciiIo("myfile.txt","r"); 
 
    while(myfileio.status()==IO_Status::OK) 
    { 
        c = myfileio.read(); 
        // ...do something with the container 
    } 
}

See Also

Io Class

Io.inFieldDelimiter Method

Io.inRecordDelimiter Method

Io.inRecordLength Method