cobrix
cobrix copied to clipboard
SYNC support
It appears that SYNC clause in copybooks is not supported at the moment. Would be good if they were. 01 LN-HEADER-1 SYNC.
Could I ask you to provide an example of a data file that has such a field? Maybe a very small synthetic example. This will speed up the implementation.
Sorry for being that guy, who asked yet is to lazy to do anything. Trying to find or generate a sample. So far unsuccessfully. At this point I only have a copybook.
SYNC Clause : This clause ensures that the item is placed at the next natural boundary, if applicable. The COBOL compiler achieves that by inserting slack bytes before the item.
In mainframe, the address resolution is efficient if the values are located at the word boundaries in the memory. for example, if the memory word size is 4 bytes that means that each word should start from an address divisible by 4.
So ideally, its not required to be fixed in spark since memory alignment is not as strict as mainframe and it does not change any value;
@yruslan : Could you please suggest ? if Ive missed any point;
Yes, thanks a lot for the explanation!
Since SYNC fields are not supported yet, can manually insert FILLERS before such fields as a workaround?
Putting this to the TODO list. But still, it would be very nice to have an example, it will speed things up and ensure the implementation is as expected.