Hi Gurus,
I m splitting the single record into two records and after that i wanted to treat these two records as two seperate records
Eg : Source Record :
3,CD,HHHHHHH,16-05-2004,31-12-99994,CD,MMMMMMM,01-01-2002,15-04-2002LastRecord
Splitting this record using Char(10) (Using in between the record based on lengths) and i m getting the output record as
3,CD,HHHHHHH,16-05-2004,31-12-9999
4,CD,MMMMMMM,01-01-2002,15-04-2002LastRecord
Here if i want to take only the last record, it is coming as
3,CD,HHHHHHH,16-05-2004,31-12-9999
4,CD,MMMMMMM,01-01-2002,15-04-2002LastRecord
(Treating splitted record as single record)
But i need only the record 4,CD,MMMMMMM,01-01-2002,15-04-2002LastRecord.
I know i can get the required ouput if i write it into Sequential file and read from there.
But without writing into sequential file is there any ways.....to get the required output.
i.e is there anythig i can use instead of Char(10) for splitting and treat the splitted records as two seperate records.
Kind Regards
Luk
How to take the splitted records as seperate records
Moderators: chulett, rschirm, roy
Write it to a sequential file output and then read it with the new format, but declare this file to be a named pipe so no I/O is done.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
To be really honest, I am confused with what you want. You want to split the records, and you got that part working. Great. Now you dont want the first half of the split record and just want the second half, right? If you always have "LastRecord" as part of data then why not constrant it on that. Or am i completely off track ?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: