Sequential stage and wildcards in the Filter

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Sequential stage and wildcards in the Filter

Post by chulett »

Does the darn Filter command in the Sequential stage not support wildcards? :evil:

I need to process an unknown number of files in a directory using a wildcard pattern. Yes, all have the same metadata and there's no header row to worry about.

Rather than use a Folder stage with its potential size issues or a before-job script, I thought I could simply put the 'wildcarded' filename in the File Name field and put 'cat' in the Filter command. I tried putting '/dev/null' in the File Name and the full just 'cat #FILE_PATH#/XXX*.csv' command in the Filter command. Nope. I either get an Error 11 trying to View the data or it crashes my entire Designer session. :?

Has anyone done this? What is the trick?

In the meantime, I'm cat'ting the files before job to a fixed filename as a 'work around' but I'd really rather not do that if possible.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Did you try writing the cat in a shell script and calling the script from your job?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Hmmm... call the script in the Filter? Nope, didn't try that. Off we go.
-craig

"You can never have too many knives" -- Logan Nine Fingers
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
Seems weird, as if the stage ignores the command and forces the value in the file path and not accepting wild cards.
I'm on 7.5 :shock:

Anyone got something different?
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: Sequential stage and wildcards in the Filter

Post by ray.wurlod »

chulett wrote:Does the darn Filter command in the Sequential stage not support wildcards?
I am not aware of any darn command, therefore cannot advise how one might use it as a Filter command in a Sequential File stage. Is the darn command UNIX or DOS, or is it only used for SOX?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Argh! You said the 'S' word! :evil:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

My sweet apple-cheek'd mother taught me to darn SOX. :P
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nick.bond
Charter Member
Charter Member
Posts: 230
Joined: Thu Jan 15, 2004 12:00 pm
Location: London

DS 7.5.1a

Post by nick.bond »

Craig, (or anyone else)

did you find a solution to this? or only a work around? having the same problem as you had, very annoying!
Regards,

Nick.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I never did find a way to cat files to standard out such that the Filter could read them in as one continuous stream. I just fell back on cat to a fixed name either before job or more typically in a specific separate 'cat' job so that I don't need to repeat it if the processing job needs to be rerun.
-craig

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