You can do that kind of thing easily with an ICETOOL job like this:
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file
//OUT DD DSN=... output file
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(p,m,f) FIRST
where p,m,f is the starting position, length and format of the bn (the key). For example, if bn is a character field in positions 1-5, you would use ON(1,5,CH).
If that doesn't help, then be more specific about what you want to do and show an example of input records and expected output records.
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:http://www.ibm.com/support/docview.wss? ... g3T7000080