examples package: Using flat file descriptors
Gloop allows developers to read and write flat files using
flat file descriptors. The examples package demonstrates this
ability with the Employees.ffd service, which can be found under the flatfile package.

Related articles
Please see the following articles for more information:
Try it!
In the Navigator, expand the examples package and navigate to the
code folder, then expand the flatfile package. This package contains
models, flat file descriptors, and services, as shown below:
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
Simply open these files and run the ReadFile and WriteFile services to see how they work
together in order to read and write flat files. Line comments1 are provided for step-by-step explanations.
Use Martini's content-assist to code faster️
Gloop steps for reading or writing flat files can easily be generated via Martini's content-assist feature. To do so:
-
Trigger Martini's content-assist feature (by pressing ) and search for your flat file service, then select it.

-
Choose Read or Write, depending on which operation is to be performed. After this action, the steps for reading or writing flat files will be generated.

-
All you have to do now tell the OpenCursor service (shown on line 1 below) where the flat file is and map the data to be read or written under the iterate step (line 3). The Open*Cursor service uses the
FlatFileclass.
-
Open the service file to see comments. Make sure comments are also not hidden. ↩