Announcement

Collapse
No announcement yet.

How to do this?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to do this?

    hmm,iam kind of newcomer at BC,pls help me how to this
    I have 2 file to compare,example
    File 1:

    [Data 1]//every record always begin by this [Data No.] and ended by 1 blank space
    Name=Data
    Address=Add
    Buy=
    Phone=
    Detail=

    [Data 2]
    Name=Data
    Address=Add
    Buy=
    Phone=
    Reason=
    Detail=
    //and so on (i have sumthing like 7000+ record)

    File 2:

    [Data 1]//every record always begin by this [Data No.] and ended by 1 blank space
    Name=Data
    Address=Add
    Buy=-
    Phone=-
    Date=-
    Reason=
    Detail=

    [Data 2]
    Name=Data
    Address=Add
    Buy=
    Phone=
    Reason=
    Date=
    Detail=
    //and so on (i have sumthing like 7000+ record)

    the question is i want the file compared by reading the [Data No.] and ended by blank space, not
    so if sumthing diff from Record [Data 1] File 1 and Record [Data 1] File 2 it showed.Have tried
    with default BC rules,sumtimes(hmm,my english so bad,so i think it will be good if give u example:

    [Data 1]//every record always begin by this [Data No.] and ended by 1 blank space
    Name=Data
    Address=Add
    Buy=
    Phone=
    Detail=

    [Data 2]
    Name=Data
    Address=Add
    Buy=
    Phone=
    Reason=
    Detail=

    [Data 3]
    Name=Data
    Address=Add
    Buy=
    Phone=
    Reason=
    Detail=

    [Data 4]
    Name=Data
    Address=Add
    Buy=
    Phone=
    Reason=
    Detail=


    File 2:

    [Data 1]//every record always begin by this [Data No.] and ended by 1 blank space
    Name=Data
    Address=Add
    Buy=-
    Phone=-
    Date=-
    Reason=
    Detail=

    [Data 2]
    Name=Data
    Address=Add
    Buy=
    Phone=
    Reason=
    Date=
    Detail=

    [Data 4]
    Name=Data
    Address=Add
    Buy=
    Phone=
    Reason=
    Detail=

    [Data 3]
    Name=Data
    Address=Add
    Buy=
    Phone=
    Reason=
    Detail=

    [Data 5]
    Name=Data
    Address=Add
    Buy=
    Phone=
    Reason=
    Detail=

    as u can see file 1 have Data Record 1,2,3,4 but file 2 have 1,2,4,3,5 . if i use default rules the BC if given like that state
    always Compare [Data 3] in file 1 with [Data 4] in file 2 and [Data 4] in file 1 with [Data 3] in file 2.what i want is BC compare
    by Data Number so [Data 3] file 1 compared with [Data 3] file 2 even the Data record skipped by other Data no. , and 1 more thing
    after that condition i want BC leave Data Record which didn't have 'pair' (like [Data 5] on file 2 , file 1 didn't have [Data 5] right so
    DC will put it down of the compared result.Thx for reading,really need your help


  • #2
    Re: How to do this?

    BC won't be able to compare these files perfectly, but you can improve the comparison by giving the [Data ] lines greater weight for alignment.

    To change the alignment, select Tools|Edit Current Rules. Go to the Alignment tab. In the Line Weights section, click New and add the regular expression \[Data with a weight of 100. This should improve the comparison.

    BC's File Viewer won't be able to do a perfect job lining up these files because the algorithm is line based and doesn't have the ability to line up based on multi line blocks of text. Once you've made the alignment change, you'll need to use the context menu Align Manually command to force the rest of the alignments.
    Chris K Scooter Software

    Comment


    • #3
      Re: How to do this?

      Sorry, I missed one other option for comparing your files.

      My coworker Erik reminded me that we have a sorted ini add on rule that will sort files like these before starting the comparison.

      You can download the rule from:
      http://www.scootersoftware.com/downl...c=kb_morerules
      Chris K Scooter Software

      Comment

      Working...
      X