Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Filter to use Unix command

Former Member
0 Kudos
112

Hi Experts,

Where I can get the information about adding the filters for using the Unix commands.

I have seen the following Filter to use to unix command in one program.

Eg: open dataset <dsn> for input in text mode filter <b>'dos2ux'</b>.?

Here "dos2ux" is a filter Unix command they used in that program.

Please let me know.

thanks,

2 REPLIES 2

Former Member
0 Kudos
58

Former Member
0 Kudos
58

Hi

You can execute an operating system command in the OPEN DATASET statement using the FILTER addition:

The following example works under UNIX:

DATA DSN(20) VALUE '/usr/test.Z'.

OPEN DATASET DSN FOR OUTPUT FILTER 'compress'.

OPEN DATASET DSN FOR INPUT FILTER 'uncompress'.

The first OPEN statement opens the file ‘/usr/test.Z’ so that the displayed data can be read into it in compressed form.

The second OPEN statement opens the file ‘/usr/test.Z’ so that the data is decompressed when it is read from the file.

regards

austin