Joined: 17 Jul 2023 Posts: 3 Location: United States
Hello,
My first post.
I have looked at the splice posts over and over, and I can't seem to get it correct. I have 100 byte records. Key is in byte 1 thru 8. I just want to completely join the records and will edit later. It is possible to have 16 records with the same key. Also could have just 1 record. I am placing the ID/Seq within an unused area of the record (bytes 80 for ID, and bytes 86 for Seq).
If there are no dupes, still want to keep the record.
Ok,
Looking at my post, I see that the spaces did not post. You can enlighten me on that also. Just added the code brackets. Hope that helps.
My Input (key in bytes 1 thru 8)
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
AAAAAAA VIEW DELET MOVE
AAAAAAA VIEW INDEX DELET MOVE
BBBBBBB MOVE
BBBBBBB DELET
BBBBBBB INDEX
CCCCCCC VIEW
CCCCCCC VIEW INDEX
******************************** Bottom of Data ********************************
Output (AAAAAAA appeared to work, BBBBBBB did not)
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
AAAAAAA VIEW DELET MOVE 0
BBBBBBB MOVE 0
CCCCCCC VIEW 0
******************************** Bottom of Data ********************************
----+----9----+----0----+----1----+----2----+----3----+----4----+----5----+----6
********************************* Top of Data **********************************
0001 01 AAAAAAA VIEW INDEX
0002 01 ............................................................
0003 01 CCCCCCC VIEW INDEX
******************************** Bottom of Data ********************************
----+----7----+----8----+----9----+----0----+----1----+----2----+----3----+----4
********************************* Top of Data **********************************
DELET MOVE 00001 02 ........................................
........................................BBBBBBB
00003 02 ........................................
******************************** Bottom of Data ********************************
Joined: 17 Jul 2023 Posts: 3 Location: United States
The following is desired output. The 100 byte records are joined based on bytes 1 thru 8. With a possibility of 16 matching records for a 1600 byte output record.
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
AAAAAAA VIEW DELET MOVE
BBBBBBB MOVE
CCCCCCC VIEW
**************************** Bottom of Data ****************************
--+----8----+----9----+----0----+----1----+----2----+----3----+----4----
***************************** Top of Data ******************************
AAAAAAA
BBBBBBB
CCCCCCC
**************************** Bottom of Data ****************************
+----5----+----6----+----7----+----8----+----9----+----0----+----1----+-
***************************** Top of Data ******************************
VIEW INDEX DELET MOVE
DELET BBBBBBB
VIEW INDEX
**************************** Bottom of Data ****************************
---2----+----3----+----4----+----5----+----6----+----7----+----8----+---
***************************** Top of Data ******************************
INDEX
**************************** Bottom of Data ****************************
The data will not have duplicates. The output dataset will not contain trailing spaces, just the 12 bytes of data per input record. Expected volume is 20 records daily, but can vary by a record or 2.
I have looked for similar SPLICE examples in the forum, but have not located a similar post (most contain keyed data). Any suggestions are greatly appreciated.
The data will not have duplicates. The output dataset will not contain trailing spaces, just the 12 bytes of data per input record. Expected volume is 20 records daily, but can vary by a record or 2.
I have looked for similar SPLICE examples in the forum, but have not located a similar post (most contain keyed data). Any suggestions are greatly appreciated.