Treat same files

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
samp
Participant
Posts: 25
Joined: Thu Nov 06, 2003 4:34 am

Treat same files

Post by samp »

Hi,

i would like to treat all ".bad" files located in a repository.

all my files have the terminaison ".bad" and i wish to treat all of them one by one using the same job.

like

*.bad files ---> transformer ---> append in file.

which stage can i use in a server job?

(My company has not the job sequence activated)
neyak4u
Participant
Posts: 3
Joined: Wed Oct 10, 2007 6:41 am
Location: india

Post by neyak4u »

I Guess u can have a regular expression to do that job.
While reading from the source directory. Read it as <PATH>/*.bad.
samp
Participant
Posts: 25
Joined: Thu Nov 06, 2003 4:34 am

Post by samp »

neyak4u wrote:I Guess u can have a regular expression to do that job.
While reading from the source directory. Read it as <PATH>/*.bad.
no i tried.

i think it is possible with filter command in the sequential input but i can't achieve it !

i don't know what i should put in the filname text box as i have put "cat #rep# *.bad " in my filter command .
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Re: Treat same files

Post by ArndW »

Hello samp,
samp wrote:...(My company has not the job sequence activated)
It is not possible to disable use of job sequences in DataStage and this looks like a perfect use for this type of job.
samp
Participant
Posts: 25
Joined: Thu Nov 06, 2003 4:34 am

Re: Treat same files

Post by samp »

ArndW wrote:Hello samp,
samp wrote:...(My company has not the job sequence activated)
It is not possible to disable use of job sequences in DataStage and this looks like a perfect use for this type ...
by "disable" i mean, we're in xp sp2 and the pop up doesn't work on a job sequence... my company has not got the patch for the problem...
that's why i have no choice.

i just would like to submit the result of the filter command in my job.
my filter command is cat *.bad > test.txt and i would like to treat in my job : test . txt..

iwill do it via a routine if it's not possible by the filter option...
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The Filter has problems with wildcards sometimes. Plus you don't do redirection there, but rather the stage reads std out of the filter command. If you want to stick with your command as written, simply put it as a 'before job' ExecSH command and then use the resulting file in the Sequential File stage like normal.

ps. Get the patch. It has been available for years.
-craig

"You can never have too many knives" -- Logan Nine Fingers
mail2krishna79
Charter Member
Charter Member
Posts: 56
Joined: Fri Apr 21, 2006 9:53 am

Same kind of requirement

Post by mail2krishna79 »

Hi
OS:WINDOWS SERVER2003
DS:server 7.2

Mine is of same requirement need to process the multiple files with the same name pattern like ex:abcd1,abcd2,abcd3,abcd4
these are all the CSV files and needto be processed through the same job
i searched the forum and found couple of options using the sequential file and filter command option using COPY or READ

I think iam missing the syntax or some thing
here is the command iam using
after giving the full file path name
copy abcd1.csv,abcd2.csv,abcd3.csv also tried the read
i tried without the file extension using the wild card but it cannot recognise the file path

could you please direct me to the right path
Any help is much appreciated

Thanks
Krishna
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post by Minhajuddin »

Hijacking threads is not encouraged in DSXchange. Please post your questions in a new post.

Now for your problem, In your sequential file stage, can change the read property to "File Pattern" and then in the "File Pattern" property you can give your file pattern and then read all your files.
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: Treat same files

Post by ray.wurlod »

samp wrote:Hi,

i would like to treat all ".bad" files located in a repository.

all my files have the terminaison ".bad" and i wish to treat all of them one by one using the same job.

like

*.bad files ---> transformer ---> append in file.

which stage can i use in a server job?

(My company has not the job sequence activated)
You DO have job sequences available - there is no way they can be de-activated.

I wonder if a Folder stage could be used in this context?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply