Donald Russell on IBM Mainframe Discussion List <IBM-MAIN@bama.ua.edu> wrote on 11/21/2011 10:16:26 AM: > I have a tape dataset from which I need to extract all records that begin > with a specific 2 byte prefix. The RECFM is VB or possibly U. > > Is there an IBM utility that lets me just select those given records? > > I thought IEBEDIT sounded like a good candidate, but that seems to deal > with actual job streams.... then I thought of IEBGENR, but that doesn't > appear to do what I want either. > > Surely I'm missing something, I'd think this is a very common task. > > For example, CMS/TSO PIPELINES > PIPE < input | STRFIND /xx/ | > output
If you want to select VB records that have XX in positions 5-6 (after the RDW in positions 1-4), you can use a DFSORT job like the following: //S1 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD DSN=... input tape file (VB) //SORTOUT DD DSN=... output file (VB) //SYSIN DD * OPTION COPY INCLUDE COND=(5,2,CH,EQ,C'XX') /* However, DFSORT cannot process RECFM=U data sets. Frank Yaeger - DFSORT Development Team (IBM) - yae...@us.ibm.com Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration => DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html