Ron, Here is a DFSORT JCL which will give you the desired results. This job splits the file into 2 files checking if the 10th character is a space.
//STEP0100 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD * 1234 12345 123456 12 12345678 1234567890 12434556666 //LE9 DD SYSOUT=* //GT9 DD SYSOUT=* //SYSIN DD * OPTION COPY OUTFIL FNAMES=GT9,INCLUDE=(10,1,CH,NE,C' ') OUTFIL FNAMES=LE9,SAVE //* Thanks Sri Hari Kolusu DFSORT Development IBM Corporation IBM Mainframe Discussion List <IBM-MAIN@listserv.ua.edu> wrote on 10/29/2012 11:25:20 AM: > From: Ron Thomas <ron5...@gmail.com> > To: IBM-MAIN@listserv.ua.edu, > Date: 10/29/2012 11:35 AM > Subject: sort jcl > Sent by: IBM Mainframe Discussion List <IBM-MAIN@listserv.ua.edu> > > Hello. > > I have a input file like the below > > 1234 > 12345 > 123456 > 12 > 12345678 > 1234567890 > 12434556666 > > Here in the above file if the length of the data is more than 9 i > need to drop and put the same in a dropped file. so in the above > file the last 2 will be dropped and kept in a new file. Pls let me > know how to acheive the same? > > Regards > Ron T > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN