understanding external filter stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
vamsi_4a6
Participant
Posts: 95
Joined: Wed Jun 04, 2014 12:06 am

understanding external filter stage

Post by vamsi_4a6 »

The output of external filter stage is not clear in below link.

http://www-01.ibm.com/support/docview.w ... wg21597213


I know what tr command will do but still it is not clear
rkashyap
Premium Member
Premium Member
Posts: 532
Joined: Fri Dec 02, 2011 12:02 pm
Location: Richmond VA

Post by rkashyap »

External filter stage is not able to handle special characters, like square brackets, escape character etc which are quite often present in value of "argument" property.

In the link given in post above ... following workaround is suggested to above mentioned bug:
1. Write "tr's" argument (which contains special characters) to Unix file " /tmp/a1".
2. Pass the content of above mentioned Unix file to "argument property" of External Filter stage by using 'cat' command in backquote/backtick.
vamsi_4a6
Participant
Posts: 95
Joined: Wed Jun 04, 2014 12:06 am

Post by vamsi_4a6 »

what i am asking is what is the output of exernal filter stage i mean what is the output of following command

tr `cat/tmp/a1`
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I thought you said you knew what the tr command does.

The example linked to was extremely generic so what exactly happens depends on what is in a1, i.e. 'the content of the argument'.
-craig

"You can never have too many knives" -- Logan Nine Fingers
vamsi_4a6
Participant
Posts: 95
Joined: Wed Jun 04, 2014 12:06 am

Post by vamsi_4a6 »

i have refereed below link for tr command

http://www.softpanorama.org/Tools/tr.shtml.

In all examples in above link we are using some flag like -c,-d but in lBM link in my original post we did not use any flag
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Those are called options for a reason. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
vamsi_4a6
Participant
Posts: 95
Joined: Wed Jun 04, 2014 12:06 am

Post by vamsi_4a6 »

what will happen without using any options.i mean if we pass only filename to tr command
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You need to look closer at the example. They are not simply passing 'only filename' to the command, the contents of the file are being cat'd to the command. And we have no idea what exactly is in the file (other than whatever 'special characters' were being passed on the command line that was causing a problem) as it's not really critical to understanding the workaround they posted.

:idea: Why not simply experiment, play with the command yourself?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply