Ob וְכַאֲשֶׁר אָבַדְתִּי, אָבָדְתִּי If they routinely lose programs, won't they also lose the ICEMAN and SuperC control statements? If it were me I'd do it in ISPF and keep a private copy of the source code for when they lose it.
-- 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: Wednesday, May 27, 2020 4:41 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Sort extracting values in PDS members Hi again! This group has been so helpful - especially Kolusu - and I have one more question as I learn how to use SORT more creatively. I have a bunch of PDS files where I have to read through each member and create some control cards based on the content in the member (due to the nature of these files, the request needs to be vague). So here are the questions: 1. Is there a way to automatically read all members of a PDS? If not, I can generate the individual file names with member in a separate process. 2. When I read each member, I will be looking for KEYWORD(value) - the keyword will be either "KEYWORD1" or "LONGKEYWORD2" and will be within the first 5 lines of the member, at which point I stop reading (some of the members have 25000 lines!), and the Keyword could be anywhere on the line, in column 1 or with a space delimiter. Keyword can be 8 or 12 characters long, and Value can be 2 to 8 characters. 3. I then need to create a string of -ADD- Value.Keyword.Dyyyymmdd (Today's date) that I will use in my further processing. Note that I could write a program to manage this, but am trying to keep the processing in a control member rather than a program, as utility programs seem to get lost around here. Since I can't show you the real input, here is some contrived data: Member1: KEYWORD1(val) Otherkw(val) Otherkey2(anothervalue) Line2 Line3 etc. Member 2: Line 1 Line 2 Otherkw(val) Otherkw2(val) LONGKEYWORD2(longvalu) Otherkw3(val) etc. Member 3: Line 1 Otherkw1(withitslongvalue) LONGKEYWORD2(valu) Line 3 etc. Member 4: Line 1 Line 2 Line 3 Line4 KW(val) Anotherkw(anditsvalue) Alongkeywordhere(withalongvalue) KEYWORD1(va) etc. This would create the output (either in a single MOD file, or separate files I can put together myself: VAL.KEYWORD1.D20200527 LONGVALU.LONGKEYWORD2.D20200527 VALU.LONGKEYWORD2.D20200527 VA.KEYWORD1.D20200527 Can something like this be done in a DFSORT step? If not, I can write the various utilities myself in Rexx and/or COBOL, so you don't need to suggest that. Thanks for your help once more! 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