Assigning SEQNUM on set of records.



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

Assigning SEQNUM on set of records.

Postby ranga_subham » Fri Oct 03, 2008 6:09 pm

Hi,

Say, a file has input records like this :

1111abc
1111bcd
1122abc
1122bcd
1122cde


Is it possible to assign the SEQNUM as shown below?

1111abc    1
1111bcd    2
1122abc    1
1122bcd    2
1122cde    3


Please suggest.

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

Re: Assigning SEQNUM on set of records.

 

Re: Assigning SEQNUM on set of records.

Postby Alissa Margulies » Wed Oct 08, 2008 8:51 pm

Try this:
//SYSIN DD *
   SORT FIELDS=(1,7,CH,A)                         
   OUTREC FIELDS=(1,7,12:SEQNUM,1,ZD,RESTART=(1,4))
/*
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: Assigning SEQNUM on set of records.

Postby ranga_subham » Mon Oct 13, 2008 3:47 pm

It does not work the way I expected..........It is assigning 1 to all the records !

Any other alternative please?

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

Re: Assigning SEQNUM on set of records.

Postby Alissa Margulies » Mon Oct 13, 2008 7:19 pm

Did you try with the sample data you provided in your previous post, or with different test data? I ran with your exact data above and got the expected output.
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: Assigning SEQNUM on set of records.

Postby ranga_subham » Mon Oct 13, 2008 9:05 pm

Alissa, my apologies........ :(

I did not change it from INREC to OUTREC and that is why I wasn't getting the result.......... :mrgreen:

Thanks a lot..........cool.
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