Advertisement

04.12.2007 at 12:17PM PDT, ID: 22508045
[x]
Attachment Details

spooling data from sql qry to flat file

Asked by rajeshnayakwadi in Programming for OS / 2, Unix Systems Programming

Tags: file, spooling, data, flat

Hi all,
I am spooling result of teradata sql to a flat file and data looks as below. I want the first 2 lines to be removed and output be written to another file say xyz.txt. I am getting the wordcount of this file and doing -2 from that wordcount and doing tail and writing result to xyz.txt. But the data is being written in a single line and want to maintain the same format except don't want first 2 lines.
Can anyone suugest me how to do this?
            data
------------------------------------------------
abc|2007-02-03|1|A |75522
abc|2007-02-03|1|F |10588
abc|2007-02-03|1|I |15469
abc|2007-02-03|1|N |3884
abc|2007-02-03|1|S |11063Start Free Trial
 
Loading Advertisement...
 
[+][-]04.12.2007 at 03:05PM PDT, ID: 18902048

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.13.2007 at 07:04AM PDT, ID: 18905420

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.13.2007 at 10:21AM PDT, ID: 18907130

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Programming for OS / 2, Unix Systems Programming
Tags: file, spooling, data, flat
Sign Up Now!
Solution Provided By: JulieBouillon
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.13.2007 at 02:45PM PDT, ID: 18908714

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.15.2007 at 08:33PM PDT, ID: 18915771

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32