mentions what needs to be considered while handling variable length records in a JOIN application. Please read through, try it out and get back if you come across something unexpected. Or search the forum for working examples.

Thank you, Bill ... unfortunately both files are VB .. with
REFORMAT FIELDS=(F2:1,4,F1:5,80,F2:5) I can get VB records from F2 , but not from F1 ... so I think I have to use 3 steps to get in both, in first, in second

The other problem here is you will not know where exactly the file2 record begins, depends on how long is the "current" file1 record which is also of variable length. So BUILDing each output would be tricky.

I'm going to take a heavy axe to this topic shortly. Anyone want to complain, don't bother.

Anatol,

I wasn't suggesting that code for you to use, because you want matches. F1,F2,ONLY will only get you mismatches. If you take off the ,ONLY you'll get REFORMAT records for B, but they would need some work because the F2 data would start immediately after the end of the F1 data.

Your best option is RDW,"fixed" data from one file,"variable" data from the other. Then, on any OUTFIL where the fixed data is used for output, you VLTRIM (be careful not to trim a vital value, so know what data can be in the last position).

Your best option is RDW,"fixed" data from one file,"variable" data from the other. Then, on any OUTFIL where the fixed data is used for output, you VLTRIM (be careful not to trim a vital value, so know what data can be in the last position).

I was going to say that is what I said anatol should do several posts back.

But wait, my posts are gone.

It kinda hurts when you spend time responding, and it gets deleted.

Yea, I know, there were some 'off topic' bantering going on, but most of my posts were on point.