I don't know if the scanner can be told to return only the segment of your choice. I wrote a GS1 parser to handle the problem of extracting the serial numbers in segment (21). I got the idea from a Google search of 'GS1 parser'. Basically, load the GS1 spec into the database. Primarlily, you'll need the AI code, the length, and whether it's a fixed or variable length field. What's nice about the GS1 AI (application identifier) spec is that the segment numbers don't overlap, i.e., you won't find a 3-digit identifier starting with a 2-digit identifier. Example: 21 is the Primary Serial Number. To my point, there's no 3- or 4-digit code that starts with 21. So, what am I getting at? The parser is simple. Grab the first 2 chars. Look for a match. None? Try the first 3 chars. None? Try 4 chars.
I can't post my code or email it to you because of intellectual property agreements; however, I found the basis of what I needed by others that DID post their parser code.
Hope that helps.
Actually, it may not. We have an application that we built in-house (not a commercial product). It was easy for me to include the GS1 parser into all the objects that read the scanner. You may not be so lucky.