Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Syncsort Grouping Data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Syncsort Grouping Data
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    Post subject:
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: Chennai

PostPosted: Wed Oct 28, 2009 5:51 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed Oct 28, 2009 8:47 pm    Post subject:
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    Post subject: Syncsort Grouping Data
Reply with quote

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

Site Director


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

PostPosted: Thu Oct 29, 2009 12:40 am    Post subject:
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    Post subject: Syncsort Grouping Data
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    Post subject: Syncsort Grouping Data
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Data replication from multiple Db2 ta... kishpra DB2 5 Mon Mar 27, 2017 9:58 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us