/* REXX */
  ADDRESS TSO
'ALLOC F(INDD) DA(OUTLIST(DSNS)) SHR REUSE'
"EXECIO * DISKR  INDD  (STEM LINE. FINIS"
  DO I = 1 TO LINE.0
    STR = PARSIT(LINE.I)
  END
  EXIT
  PARSIT:
  ARG STR
  REV = REVERSE(STR)
  PARSE VALUE REV WITH LASTVAR '.' .
  LASTVAR = REVERSE(LASTVAR)
  SAY STR LASTVAR
  RETURN STR

A.B.C.D.E E
A.B.C.D.EF EF
A.B.C.D.EFG EFG
A.B.C.D.EFGH EFGH
A.B.C.D.EFGHI EFGHI
A.B.C.D.EFGHIJ EFGHIJ
A.B.C.D.EFGHIJK EFGHIJK
A.B.C.D.EFGHIJKL EFGHIJKL
JOSEPH.CONTROL.SAMPLIB.JCL JCL
PRODUCTION.CONTROL.VSAM.DATABASE.INDEX INDEX
SYS1.PARMLIB PARMLIB
SYS5.NPLEX1.PARMLIB PARMLIB
SYS4.UBS.EXEC EXEC
SYS3.UBS.A.B.C.D D
SYS3.UBS.ABC.C.DE DE
SYS3.UBS.AB.BC.DE DE
SYS3.UBS.AB.BC.XAB XAB


On Sat, May 23, 2020 at 7:42 AM Sri h Kolusu <skol...@us.ibm.com> wrote:

> Billy,
>
> Use the following DFSORT JCL which will give you the desired results
>
> //STEP0100 EXEC PGM=SORT
> //SYSOUT   DD SYSOUT=*
> //SORTIN   DD *
> A.B.C.D.E
> A.B.C.D.EF
> A.B.C.D.EFG
> A.B.C.D.EFGH
> A.B.C.D.EFGHI
> A.B.C.D.EFGHIJ
> A.B.C.D.EFGHIJK
> A.B.C.D.EFGHIJKL
> JOSEPH.CONTROL.SAMPLIB.JCL
> PRODUCTION.CONTROL.VSAM.DATABASE.INDEX
> SYS1.PARMLIB
> SYS5.NPLEX1.PARMLIB
> SYS4.UBS.EXEC
> SYS3.UBS.A.B.C.D
> SYS3.UBS.ABC.C.DE
> SYS3.UBS.AB.BC.DE
> SYS3.UBS.AB.BC.XAB
> //SORTOUT  DD SYSOUT=*
> //SYSIN    DD *
>   OPTION COPY
>   INREC IFTHEN=(WHEN=INIT,
>          PARSE=(%=(ENDAT=C' '),
>                 %01=(SUBPOS=9,FIXLEN=8)),
>          BUILD=(01,44,%01)),
>   IFTHEN=(WHEN=(52,1,CH,EQ,C'.'),BUILD=(01,44,53,1)),
>   IFTHEN=(WHEN=(51,1,CH,EQ,C'.'),BUILD=(01,44,52,2)),
>   IFTHEN=(WHEN=(50,1,CH,EQ,C'.'),BUILD=(01,44,51,3)),
>   IFTHEN=(WHEN=(49,1,CH,EQ,C'.'),BUILD=(01,44,50,4)),
>   IFTHEN=(WHEN=(48,1,CH,EQ,C'.'),BUILD=(01,44,49,5)),
>   IFTHEN=(WHEN=(47,1,CH,EQ,C'.'),BUILD=(01,44,48,6)),
>   IFTHEN=(WHEN=(46,1,CH,EQ,C'.'),BUILD=(01,44,47,7)),
>   IFTHEN=(WHEN=(45,1,CH,EQ,C'.'),BUILD=(01,44,46,8)),
>   IFTHEN=(WHEN=NONE,BUILD=(01,44,45,9,JFY=(SHIFT=LEFT)))
> /*
>
>
> The output from this job is
>
> A.B.C.D.E                                   E
> A.B.C.D.EF                                  EF
> A.B.C.D.EFG                                 EFG
> A.B.C.D.EFGH                                EFGH
> A.B.C.D.EFGHI                               EFGHI
> A.B.C.D.EFGHIJ                              EFGHIJ
> A.B.C.D.EFGHIJK                             EFGHIJK
> A.B.C.D.EFGHIJKL                            EFGHIJKL
> JOSEPH.CONTROL.SAMPLIB.JCL                  JCL
> PRODUCTION.CONTROL.VSAM.DATABASE.INDEX      INDEX
> SYS1.PARMLIB                                PARMLIB
> SYS5.NPLEX1.PARMLIB                         PARMLIB
> SYS4.UBS.EXEC                               EXEC
> SYS3.UBS.A.B.C.D                            D
> SYS3.UBS.ABC.C.DE                           DE
> SYS3.UBS.AB.BC.DE                           DE
> SYS3.UBS.AB.BC.XAB                          XAB
>
>
> Further if you have any questions, please let me know
>
>
> Thanks,
> Kolusu
> DFSORT Development
> IBM Corporation
>
>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>


-- 
Wayne V. Bickerdike

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to