Hi,
I try to extract variable data from a variable length record. With an example, it is easier to explain.
The length of the data (Field 3 in the example)to be extracted is on each input record at a fix position (Field 2 in the example)
Input (variable length)
Layout:
Field 1: 8 bytes
Field 2: 2 bytes
Field 3: variable according to Field 2
Field 4: remaining of the record
Note: in the real case, there are NO delimiter between fields.
AAAAAAA-05 12345-GGGGGGGGGGGGGG
BBBBBBBB-03-123-HHHHHHHHH
CCCCCCCC-12-123456789012-IIIIIIIIIIIIIIIII
DDDDDDDD-08-12345678-KKKKKKKKKKKKKKKKKKKKKKK
Expected Output (variable length)
Field 1: 8 bytes
Field 2: 2 bytes
Field 3: variable according to Field 2
AAAAAAAA-05 12345
BBBBBBBB-03-123
CCCCCCCC-12-123456789012
DDDDDDDD-08-12345678
Is it possible to use Syncsort to perform this task ?
Thanks !
Pat