That sounds like a great use case for regexen.

--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Billy Ashton [bill00ash...@gmail.com]
Sent: Friday, May 22, 2020 3:57 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: How to get last node in DFSORT

Hi folks! This should be easy, but it escapes me...

I have an 80-byte LRECL list of filenames (starting in col 1, varying
lengths), and I need to capture just the last node of the file, and
store it as a separate word on the record, in col 51.

For example, if the file has
JOSEPH.CONTROL.SAMPLIB.JCL
PRODUCTION.CONTROL.VSAM.DATABASE.INDEX

I would like the records to be
JOSEPH.CONTROL.SAMPLIB.JCL(now here 24 spaces)JCL
PRODUCTION.CONTROL.VSAM.DATABASE.INDEX(12 spaces)INDEX

I expect I can use a Parse statement, but not sure how to get the last
occurrence of something...

Thanks for your help!
Billy

----------------------------------------------------------------------
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

Reply via email to