About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Troubleshooting
Problem
This article describes how to unload data to a PIPE using the SQL SELECT statement .
Resolving The Problem
Q. How do I unload data to a pipe using a select statement?
A. Perform the following steps:
- 1. From the command line type:
- mkfifo pipe
Note: Use man pages to get more information about mkfifo and pipe.
- DATABASE database_name;
UNLOAD TO "pipe" SELECT * FROM table_name;
database_name
- Database to use.
- Table to unload.
Example:
If you need to compress the output without first writing it to a file, you could use this command line to do so:
- cat pipe | compress | dd of=file.unl.Z
- file.unl.Z
- Compressed output file.
- rm pipe
- cat pipe > file.unl
[{"Product":{"code":"SSGU8G","label":"Informix Servers"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF025","label":"Platform Independent"},{"code":"PF008","label":"DYNIX\/ptx"},{"code":"PF010","label":"HP-UX"},{"code":"PF015","label":"IRIX"},{"code":"PF016","label":"Linux"},{"code":"PF026","label":"Reliant UNIX"},{"code":"PF027","label":"Solaris"}],"Version":"7.2;7.3;9.2;9.3;9.4;10.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Was this topic helpful?
Document Information
More support for:
Informix Servers
Software version:
7.2, 7.3, 9.2, 9.3, 9.4, 10.0
Operating system(s):
AIX, DYNIX/ptx, HP-UX, IRIX, Linux, Reliant UNIX, Solaris
Document number:
71439
Modified date:
16 June 2018
UID
swg21109735
Manage My Notification Subscriptions