IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Syncsort Grouping Data


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Majid Hussain

New User


Joined: 18 Aug 2007
Posts: 20
Location: Bangalore

PostPosted: Wed Oct 28, 2009 4:47 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Oct 28, 2009 5:51 pm
Reply with quote

Quote:
starting with 'STARTBB' and ending with 'ENDAA' a


you should learn to use the 'Preview' button......
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Wed Oct 28, 2009 5:51 pm
Reply with quote

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
View user's profile Send private message
Majid Hussain

New User


Joined: 18 Aug 2007
Posts: 20
Location: Bangalore

PostPosted: Wed Oct 28, 2009 7:40 pm
Reply with quote

Thanks for your responses!

Sorry for the wrong/incomplete information. Guess I was too hasty this time icon_redface.gif .

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Oct 28, 2009 8:47 pm
Reply with quote

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
View user's profile Send private message
Majid Hussain

New User


Joined: 18 Aug 2007
Posts: 20
Location: Bangalore

PostPosted: Thu Oct 29, 2009 12:25 am
Reply with quote

The syncsort version is 1.2.3..
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Oct 29, 2009 12:40 am
Reply with quote

Hello,

The release of Syncsort being used is not current.

Possibly, this can be upgraded to the current release?
Back to top
View user's profile Send private message
Majid Hussain

New User


Joined: 18 Aug 2007
Posts: 20
Location: Bangalore

PostPosted: Thu Oct 29, 2009 12:48 am
Reply with quote

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
View user's profile Send private message
Majid Hussain

New User


Joined: 18 Aug 2007
Posts: 20
Location: Bangalore

PostPosted: Fri Oct 30, 2009 11:05 am
Reply with quote

I assume this cannot be done by Syncsort or rather the older version of Syncsort.
Thanks for all the support.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top