Combine 22 datasets



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

Combine 22 datasets

Postby Manju Venkat » Fri Nov 18, 2011 5:32 pm

I have to combine 22 input datasets.
record length : 144 and record format : fb

i/p:
detail records
Trailer1 - record count (9 bytes)
Trailer2 - record count (9 bytes)
.........
Trailer15 - record count (9 bytes)

Note: No header record.

i have to combine all the input datasets and update the trailer counts of all the files.

o/p:
same file layout.
should get details of all the files and 15 trailer with updated counters of all the files.

trailer identifier is TOTAL ( starting from 1 , 5 bytes length )

ex:trailer
TOTAL NO OF ACCOUNTS THAT ARE S... : 000000001
TOTAL NO OF ACCOUNTS NOT FOUND ... : "
TOTAL NO OF ACCOUNTS THAT ARE N... : "
TOTAL NO OF ACCOUNTS CLOSED ... : "
TOTAL NO OF ACCOUNTS IN OVERDRA... : "
TOTAL NO OF ACCOUNTS WITH DEPOS....
TOTAL NO OF ACCOUNTS WITH A CAU...
TOTAL NO OF ACCOUNTS WITH A PAY...
TOTAL NO OF ACCOUNTS WITH A COU...
TOTAL NO OF ACCOUNTS WITH A NO ...
TOTAL NO OF ACCOUNTS WITH A NO ...
TOTAL NO OF ACCOUNTS WITH A POW...
TOTAL NO OF ACCOUNTS WITH A DEC...
TOTAL NO OF ACCOUNTS THAT ARE O...
TOTAL NO OF ACCOUNTS WITH CREDI...

Counter starts at position : 104
Manju Venkat
 
Posts: 16
Joined: Tue Mar 15, 2011 9:28 am
Has thanked: 0 time
Been thanked: 0 time

Re: Combine 22 datasets

 

Re: Combine 22 datasets

Postby BillyBoyo » Fri Nov 18, 2011 5:52 pm

You are lucky, a moderator got there first and took out the "urgent" of your original subject.

You are not yet clear enough in describing your data.

Do you have 22 datasets, each (with no headers) containing 15 trailer records with counts on?

Do you want to combine all those into one dataset with 15 trailer records with counts on?

Or something else that you can now describe sufficiently clearly to elicit some help.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Combine 22 datasets

Postby Manju Venkat » Mon Nov 21, 2011 8:48 am

HI,

Thanks for your quick reply. sorry for not providing the clear data's.

i have to combine 22 input dataset's to one dataset. Input and output file with no headers and 15 trailer records... i have to combine the detail records of each 22 files. each input file has 15 trailer records with counts.. and in output file i should write only 15 trailer records with all the counts of the other trailer counts .

i/p1:
12433465687697 - detail record
Trailer1 : 00000001
Trailer2 : 00000006
......
Trailer15 : 000000008

i/p2:
12433465687690 - detail record
Trailer1 : 00000003
Trailer2 : 00000004
......
Trailer15 : 000000001

likewise 22 files

O/p:
12433465687697
12433465687690
Trailer1 : 00000004
Trailer2 : 00000010
......
Trailer15 : 000000009
Manju Venkat
 
Posts: 16
Joined: Tue Mar 15, 2011 9:28 am
Has thanked: 0 time
Been thanked: 0 time

Re: Combine 22 datasets

Postby BillyBoyo » Mon Nov 21, 2011 6:32 pm

You could concatentate all your 22 datasets on SORTIN.

I would split the task into two parts. Firstly all the detail records on one dataset and the trailers on a seperate one.

From the detail records, I'd generate new trailer records.

I'd SUM the original trailers.

Extract the new trailers.

Compare the new trailers to the summerd original trailers.

This approach should ensure correct trailers, and identify any problems already existing.

You would need to identify from each detail record which trailer it is to be added to.

If you are totally secure with the existing contents of the trailers, you could ignore the generation of new trailers and the checking. Split the files as above, SUM the trailers and then do a SORT COPY with the two new files concatenated on the SORTIN.

If you want that approach in one step (maybe your files are huge), check out your documentation of Synctool.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post