How to compare gathered barcode with determined code

fergieomni:
Appreciate your help to instruct me how to store the arrives data into buffer then compare with desired data. Thanks in advance!!!

Is there some marker character that indicates the end of input from the scanner?