How to process diff files with same format ?

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
ravij
Premium Member
Premium Member
Posts: 170
Joined: Mon Oct 10, 2005 7:04 am
Location: India

How to process diff files with same format ?

Post 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.
Ravi
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rwierdsm
Premium Member
Premium Member
Posts: 209
Joined: Fri Jan 09, 2004 1:14 pm
Location: Toronto, Canada
Contact:

Re: How to process diff files with same format ?

Post 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.
Rob Wierdsma
Toronto, Canada
bartonbishop.com
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post 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.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
ravij
Premium Member
Premium Member
Posts: 170
Joined: Mon Oct 10, 2005 7:04 am
Location: India

How to process diff files with same format ?

Post 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.
Ravi
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
Post Reply