View previous topic :: View next topic
|
Author |
Message |
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Hi,
I have a requirement like this:
I/P: 80 bytes lrecl
rec1:
<td>My name is Ajay</td>.................................
rec2:
zzzzzz<td>hi this is good</td>............................
o/p: 80 bytes lrecl
rec1
My name is Ajay
rec2
hi this is good
I want to copy the text between <td> and </td> tags on an input record to the output file record. The position of <td> and </td> varies from record to record in input file.
Please suggest how we can accomplish this in easytrieve.
Thank you,
Ajay |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Using arrays of 1-byte entries and "parsing" the data in a loop.
Once <td> is found, the bytes until </td> is found are the data to write in the output. If it is possible to have multiple sets of data in one record, this would also need to be handled. |
|
Back to top |
|
|
Ajay Baghel
Active User
Joined: 25 Apr 2007 Posts: 206 Location: Bangalore
|
|
|
|
Thanks Dick,
I will try it!!
Thank you.
Ajay |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome - good luck
If there are questions/problems, someone should be here. . .
d |
|
Back to top |
|
|
|