Purpose, Argument, Streams, Usage, Examples, Related
┌─ERRor─┐ >>──┬─<──────┬──┼───────┼──┬─────────┬──┬───────┬──┬──────────┬──────────────────────>< └─FILEIN─┘ └─WARn──┘ └─REVerse─┘ └─RECno─┘ └─filename─┘ (1)
Notes: (1) The filename operand is only allowed if the stage is specified as the first stage in a pipeline.
Use the FILEOUT stage to create a disk file or replace the contents of a disk file.
FILEOUT reads records from its primary input stream and writes them to the specified
file and to its primary output stream, if it is connected. FILEOUT appends a Line-Feed
character to each output record that it writes to the specified file, primary output
stream records are written unchanged. If the specified file does not already exist;
FILEOUT creates a new file containing the records read from its primary input stream.
If the specified file already exists, FILEOUT replaces the contents of the file with
the records read from its primary input stream.
If you do not specify a fully qualified path and filename; the FILEOUT stage will create
a new file in the current working directory.
The following streams are used by the FILEIN stage:
output:
|...+....1....+....2....+....3....+....4.... record record record .. .. record
output:
|...+....1....+....2....+....3....+....4.... 1Brecord 2Brecord 1Brecord .. .. 99Brecord
output:
|...+....1....+....2....+....3....+....4.... c:\myfile.dat c:\myfile.dat d:\yourfiles\yourfile.dat .. .. d:\yourfiles\yourfile.dat
output:
|...+....1....+....2....+....3....+....4.... record record record .. .. record
output:
|...+....1....+....2....+....3....+....4.... 1Brecord 2Brecord 1Brecord .. .. 99Brecord
output:
|...+....1....+....2....+....3....+....4.... c:\myfile.datXrecord c:\myfile.datXrecord d:\yourfiles\yourfile.datXrecord .. .. d:\yourfiles\yourfile.datXrecord
output:
|...+....1....+....2....+....3....+....4.... c:\myfile.datX 1Xrecord c:\myfile.datX 2Xrecord d:\yourfiles\yourfile.datX 1Xrecord .. .. d:\yourfiles\yourfile.datX 99Xrecord
CONSOLE, >> (FILEAPPEND), > (FILEOUT), IN, OUT