Hi ,
i have one file is
file1.txt
1,2,3
2,3,4
I wanna add the file name in every record like
file1.txt,1,2,3
file1.txt,2,3,4
i have to use dos commands in before job routine.while reading this file i need to get with file name
thkssssssssssssss
Getting filename in every record
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 36
- Joined: Mon Jul 16, 2007 3:37 am
- Location: USA
How are u passing the name of the file? Parameter or hard coded? If it is hard coded then u can use a transformer to create the field and hard code this value in the derivation. Not sure if u have a column generator in the server jobs. if u have it then u can do it over there as well. Same if it is a parameter. You can give it in the field derivation in transformer.
-
- Participant
- Posts: 36
- Joined: Mon Jul 16, 2007 3:37 am
- Location: USA
Hi,Maveric wrote:How are u passing the name of the file? Parameter or hard coded? If it is hard coded then u can use a transformer to create the field and hard code this value in the derivation. Not sure if u have a column generator in the server jobs. if u have it then u can do it over there as well. Same if it is a parameter. You can give it in the field derivation in transformer.
I have one folder that contain multiple files,i need to read all the file using one stage(may be seq or folder anything),storing the records into database and records contain the name of the file.so i have to write one routine ,using that i have to give filename in evrey record..this same thing is to be done for other files in the folder..
VINOD
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If you have Enterprise Edition the parallel job Sequential File stage has the capability you ask for (a file name column).
Otherwise you will need to construct a loop in a job sequence to process the list of file names, and pass each individual file name to the job, which can then create a file name column in a Transformer stage.
Your "all in one stage" requirement is impossible to achieve in a server job.
I reject your requirement and substitute my own. (Apologies to Adam Savage)
Otherwise you will need to construct a loop in a job sequence to process the list of file names, and pass each individual file name to the job, which can then create a file name column in a Transformer stage.
Your "all in one stage" requirement is impossible to achieve in a server job.
I reject your requirement and substitute my own. (Apologies to Adam Savage)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.