SyncSort - Extract var length using input field value



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

SyncSort - Extract var length using input field value

Postby Patemagnan » Sat Nov 07, 2009 3:57 am

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
Patemagnan
 
Posts: 2
Joined: Sat Nov 07, 2009 3:30 am
Has thanked: 0 time
Been thanked: 0 time

Re: SyncSort - Extract var length using input field value

 

Re: SyncSort - Extract var length using input field value

Postby dick scherrer » Sat Nov 07, 2009 4:11 am

Hello Pat and welcome to the forum,

This may or may not be do-able with the current release of Syncsort.

Probably not what you are looking for, but it would be fairly simple using reference modification in COBOL.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: SyncSort - Extract var length using input field value

Postby Patemagnan » Sat Nov 07, 2009 4:40 am

Thanks!
I concluded to the same. I was hoping to be wrong.
To my knowledge, a Cobol program will be, by far, less performant than SyncSort.
Patemagnan
 
Posts: 2
Joined: Sat Nov 07, 2009 3:30 am
Has thanked: 0 time
Been thanked: 0 time

Re: SyncSort - Extract var length using input field value

Postby dick scherrer » Sat Nov 07, 2009 6:40 am

Hello,

a Cobol program will be, by far, less performant than SyncSort
In this case the performance difference would be mostly due to way Syncsort does i/o. The actual data manipulation code wil be very inexpensive - after the read, only 1 bit of arithmetic and 1 move is needed. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post