The Sequential I/O command reads and writes to ASCII text files, also called flat files or sequential files. The Application Directory, Application File, and File Record identify the specific record and file to be read or written. The ability to select the directory, file, and record enables you to maintain the same records in multiple files, or the same files in multiple directories.
I/O Command – choose from:
Read Record – reads the next record in the file. This command is executed each time it is encountered in a map execution.
Read Once – reads the next record in the file. This command is executed only the first time it is encountered in a map execution.
Write Record – writes or appends the record to the file. The file is created if it does not exist. If it does exist, new records are added to those already in the file.
Rewrite Record – rewrites the first record in the file. This command is used for one-record files such as counter type records.
Application Directory – the name of the directory in which the file containing the record to be read or written is located. When you select the up arrow next to the Application Directory text box, the Directories (Mailboxes) window displays. If all three location-related text boxes are empty, you can open the directory and file containing the record and double-click the record. The program automatically enters the names of the directory, file, and record in the three text boxes. Otherwise, you must enter information in the text boxes or use drag-and-drop actions.
Application File – the name of the file in which the record to be read or written is located.
File Record – the name of the record to be read or written.