Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Fri Jul 20, 2007 10:18 pm Post subject:
Vak255,
1. I just love your Catchy 1 word subject "SORT -", but I do not understand what you are trying to accomplish from that.
2. Sort XSUM will not help you out to get matching records. You either need to use SPLICE with ALLDUPS or Use Inrec to append a char '01' at the end of layout and SORT On key, Sum on '01' and use OUTFIL INCLUDE to write only records whose '01' sum becomes '02'.
Phantom, sorry for the confusion and that 1 word subject line. i thought of updating it later but forgot to.....if i could able to edit it ..i would have corrected it.
I have some accounts in AV.E100.IIRS.CNREC.A, and some in AV.E40011A.EXTRGS.CNEX. I like to pick only the accounts from AV.E40011A.EXTRGS.CNEX which are there in AV.E100.IIRS.CNREC.A.
i.e here the only matching acct is 214A010012405 so i want only this record in the output file.
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Mon Jul 23, 2007 9:31 am Post subject:
Quote:
I have some accounts in AV.E100.IIRS.CNREC.A, and some in AV.E40011A.EXTRGS.CNEX. I like to pick only the accounts from AV.E40011A.EXTRGS.CNEX which are there in AV.E100.IIRS.CNREC.A.
vak255,
Do you have any duplicates in either of the files? What version of syncsort are you running ? ( You can find this in the first line of your sysout)
If you are running syncsort version 1.2 and higher then you can use JOIN feature to capture the matching records.
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Mon Jul 23, 2007 10:10 am Post subject:
Vak255,
Try this sample JCL - (you need to customize to your requirements - field positions and LRECL). This will work with older versions of syncsort that supports SPLICE (v 1.1 and above).
In this example, my input file is of LRECL=500 and RECFM=FB. My Key is entire Record (1,500) itself. Here I append a hardcoded literal 'DD', 'UU', '11', '22' at the end of the record (501,2). You need to manipulate these field positions to meet your requirements.
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Mon Jul 23, 2007 10:57 am Post subject:
Vak255,
The version of Syncsort (PGM=SORT) and Synctool will be different. The correct version of sort can be found only in PGM=SORT. Please check the sysout and get back to us on the version.
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Mon Jul 23, 2007 11:54 am Post subject:
Quote:
The first line in sysout " SYNCSORT FOR Z/OS 1.2.3.0R U.S. PATENTS: 4210961, 5117495"
vak255,
Your syncsort version does support JOIN feature. It can deal with duplicates and can be done in a single pass. Search the board for JOINKEYS and you will find numerous examples
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum