Combine multiple record on key to single record



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Combine multiple record on key to single record

Postby mfnme » Wed Nov 06, 2013 5:17 pm

Hi All,

I have requirement to combine record on keys and make it a single record. The file can have either repeated record on key ( position 1 - 10) or record can be there without repeat also. When not repeated i need to retain record as it. There can only be maximum of 2 record per key. If repeated , then I need few fields from record2 to be taken to record1 and have a single record per key.

File size : 1000
Key position: 1 - 10
Out put files field : position 1 to 577 byte ----> retain from record 1
position 578 to 137 byte ----> from position 71 to 137 bytes from Record2
position 715 to 21 byte ----> retain from record 1
position 736 to 14 byte ----> from position 258 to 14 bytes from Record2
position 750 to 250 byte ----> retain from record 1

PLease help on this
mfnme
 
Posts: 2
Joined: Tue Oct 29, 2013 12:54 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Combine multiple record on key to single record

Postby NicC » Wed Nov 06, 2013 5:40 pm

Please help us to help you by providing relevant information. If you read through several topics you will see the kind of information required.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Combine multiple record on key to single record

Postby BillyBoyo » Wed Nov 06, 2013 6:46 pm

Can you please run this, and post the sysout from the step?

//S1 EXEC PGM=
//SYSOUT   DD SYSOUT=*
//SORTIN DD *
the value here does not matter, just want to see the sysout to determine your SORT level
/*
//SORTOUT DD DUMMY
//SYSIN   DD   *
  OPTION COPY
/*
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post