Welcome Guest. Sign in or Signup

1 Answers

Reading File into RowSet

Asked by: 6981 views File Layout

Before processing a file using File Layout, it would be a good idea to read the entire file into a RowSet and then traverse the RowSet to process the data. How do you read a row of data from the file into the Rowset?

Related Questions

1 Answers



  1. candidate on Oct 31, 2011 Reply

    The below code takes care of opening a File using a File Layout and reads the data into a RowSet.

    &FILE1 = GetFile(&file_path, “r”, “a”, %FilePath_Absolute);

    If &FILE1.IsOpen Then
    &FILE1.SetFileLayout(FileLayout.YOUR_FILE_LAYOUT_FL);
    &RS1 = &FILE1.CreateRowset();
    &RS1 = &FILE1.ReadRowset(); /* Reads root Segment into &RS1*/

    /* do processing */

    End-If;

    +7 Votes Thumb up 0 Votes Thumb down 0 Votes


Answer Question