View previous topic :: View next topic
|
Author |
Message |
Majid Hussain
New User
Joined: 18 Aug 2007 Posts: 20 Location: Bangalore
|
|
|
|
Hi,
I have a file with the following data.
STARTAA.......................
11............................
22............................
33............................
44............................
ENDAA.........................
STARTBB.......................
11............................
22............................
33............................
44............................
ENDBB.........................
STARTCC.......................
11............................
22............................
33............................
44............................
ENDCC.........................
Now I want to extract records starting with 'STARTBB' and ending with 'ENDAA' and all the records in between these two. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
starting with 'STARTBB' and ending with 'ENDAA' a |
you should learn to use the 'Preview' button...... |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
Quote: |
Now I want to extract records starting with 'STARTBB' and ending with 'ENDAA' and all the records in between these two. |
I don't get you.Pls post the desired result data. |
|
Back to top |
|
|
Majid Hussain
New User
Joined: 18 Aug 2007 Posts: 20 Location: Bangalore
|
|
|
|
Thanks for your responses!
Sorry for the wrong/incomplete information. Guess I was too hasty this time .
What I wanted to ask is that I have the file which has several groups of data which spans across several record.
And I wanted to use syncsort to get only those records which belong to the same group.
STARTAA
1111
2222
3333
4444
ENDAA
This is a group of data which has 6 records.
(To avoid confusion I have removed dots. That was really unnecessary)
The only way to determine the start and end of the group is to check the first five characters 'START' in the first record
STARTAA
or 'END' in the last record
ENDAA
I know I can get the STARTAA and ENDAA by using IFTHEN. In this case how do I get the rest of records in the group? and I cannot use WHEN=GROUP of IFTHEN clause.
Sample File Record:
STARTAA
1111
2222
3333
4444
ENDAA
STARTBB
1111
2222
3333
ENDBB
STARTCC
1111
2222
3333
4444
5555
ENDCC
Desired Result:
STARTBB
1111
2222
3333
ENDBB |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Which release of Syncsort is being used? The release info is shown at/near the top of the informational output from a sort execution. |
|
Back to top |
|
|
Majid Hussain
New User
Joined: 18 Aug 2007 Posts: 20 Location: Bangalore
|
|
|
|
The syncsort version is 1.2.3.. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
The release of Syncsort being used is not current.
Possibly, this can be upgraded to the current release? |
|
Back to top |
|
|
Majid Hussain
New User
Joined: 18 Aug 2007 Posts: 20 Location: Bangalore
|
|
|
|
Hi,
I know that and upgrade is not possible at this stage. Is it possible to do it with the version 1.2.3 ??.. |
|
Back to top |
|
|
Majid Hussain
New User
Joined: 18 Aug 2007 Posts: 20 Location: Bangalore
|
|
|
|
I assume this cannot be done by Syncsort or rather the older version of Syncsort.
Thanks for all the support. |
|
Back to top |
|
|
|