Page 2 of 2

Re: moving of matched and unmatched records

PostPosted: Tue Sep 11, 2012 7:31 pm
by dick scherrer
Hello and welcome to the forum,

As your question directly relates to this question, i'll leave it here. Once you become more familiar with how the forum works, you will learn that it is best to start a new topic rather than reply to a topic that has been dormant for 2 years. You can include a link to the earlier topic in your new post.

REFORMAT FIELDS=(F1:1,80,F2:1,80)
Note that both records are put into the 160 bytes. The check of pos 81 is to see if there is data or not.

Re: moving of matched and unmatched records

PostPosted: Tue Sep 11, 2012 7:45 pm
by BGronli
Thank you both, NicC and Dick, both responses helped.

Re: moving of matched and unmatched records

PostPosted: Wed Sep 12, 2012 5:03 am
by BillyBoyo
DFSort has something a ?, which is the JOINKEYS match marker.

REFORMAT FIELDS=(F1:1,80,?,F2:1.80)


The values that the byte placed at the position of the ? can contain are B, on both files, 1, on file 1 only, and 2, on file 2 only.

So:
INREC IFTHEN=(WHEN=(81,1,CH,EQ,C'2').BUILD=(82,80)


Would copy the whole of record 2 (of 80 bytes) to position 1 of the record when you have an F2 only.

Note that you can put the REFORMAT data in any order that you want:

REFORMAT FIELDS=(F2:1,4,F1:2.6,F2:91,107.F1:5,1,F2:1.80,?)


If that is the way you want the data, that is the way you can have it.