View previous topic :: View next topic
|
Author |
Message |
sanupadh
New User
Joined: 29 Jun 2010 Posts: 11 Location: chennai
|
|
|
|
I am having a problem that is most similar to this.
input/output record lenght is 133.
Input looks like ----------------
columns - 123456789...............................
CCNA report 1 Date - rundate
xxxxx Page 1
Market id : AATS date
cuid:CCSC
record1
record2
...........
recordn
CCNA report 1 Date - rundate
xxxxx Page 2
Market id : AAQS date
cuid:CCSC
record1
record2
...........
recordn
CCNA report 1 Date - rundate
xxxxx Page - 3
Market id : AAPS date
cuid:CCUC
record1
record2
...........
recordn
there can be n no of total records.also lines in each group are not fixed
I want to split this report into two files.
based on cuid
there are only two cuid in the files -CCUC and CCSC
File1- having record for cuid CCSC
File2- having record for cuid CCUC
Output file 1
123456789...............................
CCNA report 1 Date - rundate
xxxxx Page 1
Market id : AATS date
cuid:CCSC
record1
record2
...........
recordn
CCNA report 1 Date - rundate
xxxxx Page 2
Market id : AAQS date
cuid:CCSC
record1
record2
...........
recordn
Output file 2
CCNA report 1 Date - rundate
xxxxx Page - 1
Market id : AAPS date
cuid:CCUC
record1
record2
...........
recordn |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Thanks Peter.
sanupadh,
You've made a real mess of this so far. Multiple posts. Tailgating an old topic. Not using the Code tags. Soliciting responses.
Please, a new topic for a new question (you can refer to other information here with a URL link). Don't post multiple times. Use the Code tags to preserve spacing and make any data/code easier to read. Don't prompt for help if you don't get an answer within moments, unless you are intending paying someone to give you the answer. |
|
Back to top |
|
|
|