On Tue, 26 May 2020 19:42:31 +0000, Seymour J Metz wrote: >Well, in this case the hammer is the reverse function; >/\.([#$@[:upper:][:digit:]]{1,8})\n/, despite the awkward syntax, is still >cleaner. > I was more thinking of the OP's requirement for DFSORT as the hammer. And Sri supplied a massive sledgehammer.
Don't forget '-' is sorta legal in data set names; more characters if the DSN needn't be catalogued. And Sri's example contained a node longer than 8 bytes. And what if there are characters further to the right that must be preserved? But I assumed a terminating ' '. So: awk '{ match( $0, /\.[^. ]* / ) print( substr( $0, 1, 50) substr( $0, RSTART + 1, 8 ) substr( $0, 59 ) ) }' >Wasn't there a song on the 1960's, Lexity, Lex, YACCitty YACC? -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN