View previous topic :: View next topic
|
Author |
Message |
bachi234
New User
Joined: 15 May 2007 Posts: 6 Location: VA
|
|
|
|
Hi Experts, I need help with the below scenario. Could you please let me know how this can be done through ICETOOL. Record length of the file is 200 and record format is VB.
Appreciate your help. Thank you.
I have below records in a file. I need to check 5th record(1:8) is </BEGIN> then if its satisfies the condition omit that row . If the 5h record is not </BEGIN> that then i need to ignore that.
INPUT
Code: |
<?XML VERSION="1.0">
<!DOCTYPE REPORT SYSTEM "HTTPS://XXX.XXXX.XX/XXX/XXX/XX"
<Report xmlns="https://XXX.XXXX.XXX/XXX/XXX/XX"
<BEGINS>
</BEGIN>
<BEGIN ID="1234" DATE="2014-01-01"
</END>
</BEGIN>
<BEGIN ID="1235" DATE="2014-01-01"
</END>
</BEGIN>
<BEGIN ID="1235" DATE="2014-01-01"
</END>
<BEGINS></REP> ~ |
Output -
Code: |
<?XML VERSION="1.0">
<!DOCTYPE REPORT SYSTEM "HTTPS://XXX.XXXX.XX/XXX/XXX/XX"
<Report xmlns="https://XXX.XXXX.XXX/XXX/XXX/XX"
<BEGINS>
<BEGIN ID="1234" DATE="2014-01-01"
</END>
</BEGIN>
<BEGIN ID="1235" DATE="2014-01-01"
</END>
</BEGIN>
<BEGIN ID="1235" DATE="2014-01-01"
</END>
<BEGINS></REP> ~ |
Coded |
|
Back to top |
|
|
kranthikumarb
Active User
Joined: 02 Jan 2009 Posts: 115 Location: Hyderabad
|
|
|
|
Punch in sequence number using inrec overlay.
then omit condition if seq number = 5 and record starts with </begin> |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
What have you got against using code tags to present your code/dta in a professional manner? Unless it is code you lose alignment and 'excess' spaces are removed by the web browser.
Coded for you this time (again). |
|
Back to top |
|
|
|