Good morning! I am trying to do what I thought was a simple SORT Copy function to create some commands from an input file, but I am being thwarted by embedded blanks in my line. Here is the input (Sorry for the formatting issues, I am not sure how to post fixed-space text):
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+- > 400 B400-DATABASE 1001 BRN B400-BRANCH-BLDG > (1001) T > 400 B400-DATABASE 3 HST B400-TRANHIST > (0003) H > 400 B400-DATABASE 4 HST B400-TRANHIST > (0004) H > 400 B400-DATABASE 5 HST B400-TRANHIST > (0005) H I want to add to this an Alphabetic sequence for duplicate names (the number of duplicates cannot be more than 10), but the only way I know to do this is to create a 2-digit numeric sequence, and then convert that to a single letter. Here is the output I get currently: ....+....10...+....20...+....30...+....40...+....50...+....60.. -UTL COPY,TABLE,B400-BRANCH-BLDG (1001),BRN0400A -UTL COPY,TABLE,B400-TRANHIST (0003),HST0400A -UTL COPY,TABLE,B400-TRANHIST (0004),HST0400B -UTL COPY,TABLE,B400-TRANHIST (0005),HST0400C But this is what I want ....+....10...+....20...+....30...+....40...+....50...+....60.. -UTL COPY,TABLE,B400-BRANCH-BLDG(1001),BRN0400A -UTL COPY,TABLE,B400-TRANHIST(0003),HST0400A -UTL COPY,TABLE,B400-TRANHIST(0004),HST0400B -UTL COPY,TABLE,B400-TRANHIST(0005),HST0400C Here is my code...can someone help me to get rid of the spaces in the name, before the (#### value? //SYSIN DD * OPTION COPY INREC IFTHEN=(WHEN=(1,1,CH,EQ,C'>'), BUILD=(01:01,01, 02:49,03, 05:55,32, 40:88,06, 50:04,04,UFF,M11,LENGTH=04, 60:SEQNUM,2,ZD,START=1,INCR=1,RESTART=(55,32))) OUTFIL FNAMES=SORTCMD2,INCLUDE=(1,1,CH,EQ,C'>'), BUILD=(C'-UTL COPY,TABLE,', 05,32, 40,06, C',', 02,03, 50,04, 60,02,CHANGE=(1, C'01',C'A',C'02',C'B',C'03',C'C',C'04',C'D', C'05',C'E',C'06',C'F',C'07',C'G',C'08',C'H', C'09',C'I',C'10',C'J'),NOMATCH=(C'$'),80:X) I tried to use 05,32,SQZ=(SHIFT=LEFT), and that may have worked, but then it just padded the rest of the 32 bytes with spaces, so it did nothing. Thanks in advance! Don Johnson ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN