Sort within Sort



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Sort within Sort

Postby ranga_subham » Mon Sep 29, 2008 7:06 pm

Hi,

My input data is like this -

----+----1----+----2----+----3
ALIMA 111111111111111 RANGA
B1B1B 232323232323232 RANGS
CARCU 111111111111111 RANG1
DELM8 323232323232323 RANGT
SUBRA 111111111111111 RANG2
DELM8 323232323232323 RANGJ


After sorting the above data, I want the output to be appear like below -

ALIMA 111111111111111 RANGA
CARCU 111111111111111 RANG1
SUBRA 111111111111111 RANG2
B1B1B 232323232323232 RANGS
DELM8 323232323232323 RANGJ
DELM8 323232323232323 RANGT


I need to SORT data between colums 7 and 21 only......... Please help.

Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Sort within Sort

 

Re: Sort within Sort

Postby ranga_subham » Mon Sep 29, 2008 7:12 pm

Hi,

We are using "SYNCSORT FOR Z/OS 1.2.3.1R"

Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Sort within Sort

Postby Alissa Margulies » Mon Sep 29, 2008 7:42 pm

Try this:
//SORT1 EXEC PGM=SORT,PARM='EQUALS'
//SORTIN  DD *                       
ALIMA 111111111111111 RANGA         
B1B1B 232323232323232 RANGS         
CARCU 111111111111111 RANG1         
DELM8 323232323232323 RANGT         
SUBRA 111111111111111 RANG2         
DELM8 323232323232323 RANGJ         
//SORTOUT DD SYSOUT=*               
//SYSOUT  DD SYSOUT=*               
//SYSIN   DD *                 
   SORT FIELDS=(7,15,CH,A)   
/*
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: Sort within Sort

Postby ranga_subham » Mon Sep 29, 2008 8:16 pm

Alissa, first of all I would say "THANK YOU" for your quick reply to my question. Next thing is "I AM VERY SORRY" for not posting my requirement very clearly............ :x :oops:

Actually, I want to get the output as shown below -

ALIMA 111111111111111 RANGA
SUBRA 111111111111111 RANG2
B1B1B 232323232323232 RANGS
DELM8 323232323232323 RANGJ
DELM8 323232323232323 RANGT


ONLY the first and last record of every SORT KEY as shown above........ :roll: :|

Thanks for your time.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Sort within Sort

Postby ranga_subham » Tue Sep 30, 2008 8:48 pm

Hi,

Would you please tell me how to achieve it? :cry:

Thanks.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Sort within Sort

Postby Alissa Margulies » Tue Sep 30, 2008 9:04 pm

Let me think about it for a bit. I'll try to get this in a single pass of the data... so far, I have the first dup in one pass and the last dup in a second pass...
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 1 time

Re: Sort within Sort

Postby ranga_subham » Wed Oct 01, 2008 3:14 pm

Ok Alissa........I will wait for your reply.
ranga_subham
 
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Has thanked: 0 time
Been thanked: 1 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post