Q5.2: Can I use a named pipe to bcp/dump data out or in?
System 10 and above.
If you would like to bcp copy from one table to a named pipe
and compress:
- %mknod bcp.pipe p
- %compress < bcp.pipe > sysobjects.Z &
- %bcp master..sysobjects out bcp.pipe -c -U .. > bcp.pipe
- Use ps(1) to determine when the compress finishes.
To bcp from my1db..dummy_table_1 to my2db..dummy_table_2:
- %mknod bcp.pipe p
- %bcp my2db..dummy_table_2 in bcp.pipe -c -U .. &
To avoid confusion between the above bcp and the next, you may
choose to either use a separate window or redirect the output to a file.
- %bcp my1db..dummy_table_1 out bcp.pipe -c -U ..