Pipes in BTEQ

Tools & Utilities
Enthusiast

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.
Tags (2)
1 REPLY
Enthusiast

Re: Pipes in BTEQ

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

.QUIET ON

.REPEAT *

USING
......

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.