All Forums Tools
Kishore_1 208 posts Joined 03/10
22 Jun 2011
Pipes in BTEQ

BTEQ can read the output data directly from another BTEQ job,
using named pipes, without even getting the data on a storage device.

Could anyone please explain this with an example.

A sample code snippet will be helpful.

njvijay 19 posts Joined 08/09
27 Jun 2011

You can use the following command in shell script to create named pipes

mknod tran_data.out p

Let us say, if you want to export data in named pipes, embed bteq in the same shell script

.export indicdata file = tran_data.out

SELECT * FROM trans;

.export reset

Same time, you want to read the named pipes and import it to another table, use above created named pipes as follows (in another shell script)
.import indicdata file = tran_data.out




Make sure both the scripts are running concurrently or if you want to run export and import in a same script, you may need to use functions to run export process in background (&) and import process in foreground.

You must sign in to leave a comment.