> On Jul 15, 2017, at 10:39 PM, Sri h Kolusu <[email protected]> wrote: > > Edward, > > Here is a DFSORT JCL which will give you the desired results. I assumed > that your input file is FB and 80 bytes in length. I also assumed that > your name and domain names are each 30 bytes in length. > > //STEP0100 EXEC PGM=SORT > //SYSOUT DD SYSOUT=* > //SORTIN DD * > [email protected] <mailto:[email protected]> > [email protected] <mailto:[email protected]> > [email protected] <mailto:[email protected]> > [email protected] <mailto:[email protected]> > [email protected] <mailto:[email protected]> > //SORTOUT DD SYSOUT=* > INREC PARSE=(%01=(ENDBEFR=C'@',FIXLEN=30), $ GET FIELD BEFORE @ > %02=(ENDBEFR=C'.',FIXLEN=30)), $ GETFIELD BEFORE . > OVERLAY=(081:%01, $ PUT NAME AT 81 > 111:%02) $ PUT DOMAIN AT 111 > > SORT FIELDS=(081,30,CH,A, $ NAME > 111,30,CH,A),EQUALS $ DOMAIN > > OUTREC BUILD=(1,80) $ REMOVE TEMP FIELDS > /* > > The output from this field is > > [email protected] <mailto:[email protected]> > [email protected] <mailto:[email protected]> > [email protected] <mailto:[email protected]> > [email protected] <mailto:[email protected]> > [email protected] <mailto:[email protected]> > > Further if you have questions please let me know > > Thanks, > Kolusu > DFSORT Development > IBM Corporation >
Thanks!… I would never have gotten that without a lot of testing. Also I did not know the first “field” was limited to 30. I learned several things today. Ed ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
