to remove first line from mutiple files
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 89
- Joined: Sat Jul 24, 2010 11:33 pm
to remove first line from mutiple files
Hi ,
I have three files which contain first line as UTF8. I have used sed command to remove the first line. It worked but I'm testing the job so each time when I run the job it deletes the first line. Is there any other way so that I can exclude the first line and run the job using the logic in the stages ?
I have three files which contain first line as UTF8. I have used sed command to remove the first line. It worked but I'm testing the job so each time when I run the job it deletes the first line. Is there any other way so that I can exclude the first line and run the job using the logic in the stages ?
-
- Participant
- Posts: 89
- Joined: Sat Jul 24, 2010 11:33 pm
So here we are in the right place now. Are you using the "File Pattern" option to read the multiple files? From what I recall, it will only skip the header record from the first file rather than all of them which I find rather... stupid.
If your sed command is working, have you tried leveraging that in the Filter option of the stage?
If your sed command is working, have you tried leveraging that in the Filter option of the stage?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 89
- Joined: Sat Jul 24, 2010 11:33 pm
-
- Participant
- Posts: 89
- Joined: Sat Jul 24, 2010 11:33 pm
Can you please tell me how to do that in the sequential stage . Im new to datastage.
Last edited by developeretl on Thu Aug 04, 2011 10:02 am, edited 1 time in total.
-
- Participant
- Posts: 89
- Joined: Sat Jul 24, 2010 11:33 pm
It's a property in the stage and documented as well. I'm not anywhere with access so I can't quote chapter and verse where to find it but I can't imagine it would be all that hard to look up.
Worst case maybe someone else can provide the gory details.
Worst case maybe someone else can provide the gory details.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 89
- Joined: Sat Jul 24, 2010 11:33 pm
-
- Participant
- Posts: 89
- Joined: Sat Jul 24, 2010 11:33 pm
I'm using 7x, and not yet familiar with differences with 8x, but here's how I'd do it:
Code: Select all
Properties
Options
First line is column names = True
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872