How to flag each flat file record with the filename?

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
sagar deshmukh
Participant
Posts: 103
Joined: Fri Jan 18, 2008 12:55 am
Location: chennai

How to flag each flat file record with the filename?

Post by sagar deshmukh »

Hi,

I need a help regarding a requirement... I need to design a job where I have Three files which will arrive in a folder..I need to create a simple job which will read all the three files one by One...and load datainto final table...but each column should be flaged with the file name from which it has fetched... Ex. Say 1st record came from File called "A" then it should be flaged as" A" in one of the flag column....

How can i achieve this....as my all three files can arrive at same time or may be at different time also
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Use a job sequence to obtain list of files from the folder and call your load job with the file name as a parameter.

Give it a try and post if you have any issues.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The Sequential File stage supports a 'Filename' column it can add for you. Do you need to wait for all three before you process? How are you planning on doing that?
-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 »

Please try to choose meaningful subject.
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 »

Yes - we know you "Need Help", that's why people start posts here. Let me see if I can help... [scratches head] hmmm...
-craig

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