Page 1 of 1

Treat same files

Posted: Tue Jun 17, 2008 4:24 am
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)

Posted: Tue Jun 17, 2008 4:38 am
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.

Posted: Tue Jun 17, 2008 4:45 am
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 .

Re: Treat same files

Posted: Tue Jun 17, 2008 5:09 am
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.

Re: Treat same files

Posted: Tue Jun 17, 2008 5:52 am
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...

Posted: Tue Jun 17, 2008 6:22 am
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.

Same kind of requirement

Posted: Tue Jun 17, 2008 12:43 pm
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

Posted: Tue Jun 17, 2008 8:27 pm
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.

Re: Treat same files

Posted: Tue Jun 17, 2008 8:38 pm
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?