The examples in this section show how to specify the DATAFILES field.
Assume that the database server is running on four nodes, and one file is to be read from each node. All files have the same name. The DATAFILES specification can then be as follows:
DATAFILES ("DISK:cogroup_all:/work2/unload.dir/mytbl")
Now, consider a system with 16 coservers where only three coservers have tape drives attached (for example, coservers 2, 5, and 9). If you define a cogroup for these coservers before you run load and unload commands, you can use the cogroup name rather than a list of individual coservers when you execute the commands. To set up the cogroup, run onutil.
% onutil 1> create cogroup tape_group 2> from coserver.2, coserver.5, coserver.9; Cogroup successfully created.
Then define the file locations for named pipes:
DATAFILES ("PIPE:tape_group:/usr/local/TAPE.%c")
The filenames expand as follows:
DATAFILES ("pipe:2:/usr/local/TAPE.2", "pipe:5:/usr/local/TAPE.5", "pipe:9:/usr/local/TAPE.9")
If, instead, you want to process three files on each of two coservers, define the files as follows:
DATAFILES ("DISK:1:/work2/extern.dir/mytbl.%r(1..3)", "DISK:2:/work2/extern.dir/mytbl.%r(4..6)")
The expanded list follows:
DATAFILES ("disk:1:/work2/extern.dir/mytbl.1", "disk:1:/work2/extern.dir/mytbl.2", "disk:1:/work2/extern.dir/mytbl.3", "disk:2:/work2/extern.dir/mytbl.4", "disk:2:/work2/extern.dir/mytbl.5", "disk:2:/work2/extern.dir/mytbl.6")
Related statements: INSERT and SET PLOAD FILE
See also the INTO Table Clauses of SELECT.
For more information on external tables, refer to your IBM Informix Administrator's Reference.