Page 1 of 1

How to process diff files with same format ?

Posted: Fri Mar 03, 2006 6:11 am
by ravij
Hi,

Situation is You have more than one file exactly the same format but different
file names.
How should we process the diff cases below.
case1. All files come at the same time
case2. File comes at different times so how should we process as and when the
file arrives

any response can be appreciated.

Posted: Fri Mar 03, 2006 8:16 am
by chulett
Short answers are: 1) concatenate. 2) Intelligent job control or a 'file watch' process that kicks off the job and passes in the found filename.

Re: How to process diff files with same format ?

Posted: Fri Mar 03, 2006 8:21 am
by rwierdsm
Ravij,

Do you know the names of the files coming in, or do they match a pattern?

Are the input files the only files that will be in the input directory? Do you delete/move/archive input files after processing.

Different approaches would be taken depending on the answer to these questions.

Rob W.

Posted: Fri Mar 03, 2006 9:55 am
by I_Server_Whale
Hi Ravij,

I think you can run multiple instances of the jobs for each of those files. I mean, an instance for each one of those files.

Howz that???

Thanks,
Naveen.

How to process diff files with same format ?

Posted: Mon Mar 06, 2006 1:20 am
by ravij
Hi Chulett,
Short answers are: 1) concatenate. 2) Intelligent job control or a 'file watch' process that kicks off the job and passes in the found filename.
Could you please give some brief description about your above message?

thanks in advance.

Posted: Mon Mar 06, 2006 1:45 am
by ArndW
If you have MKS Tookit or cygwin you can use the UNIX "cat" command to concatenate all your files with the same format into just one file, then you can use that name as your parameter to DataStage jobs. If you are on windows as your subject suggests, you can use the command "copy /b {filea}+{fileb}+{filec}+... {newfilename}.

The intelligent job control depends upon your version, before 7.5 you had to do a bit of work to get a sequence to process {n} incoming files; with the loop activity in 7.5 it has become much easier to loop through all files that match a pattern.