IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

To find an array of words (sys-symbols) inside members


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
alonki

New User


Joined: 24 Jan 2022
Posts: 1
Location: ISRAEL

PostPosted: Mon Jan 24, 2022 9:44 pm
Reply with quote

Hi to ya all,

Is there any way or technique that I can use in order to find an array of words (sys-symbols) inside members/modules? We want to know who use all the long list of our sys-symbols in order to cancel the ones that are not in use. Maybe there is some other way to do that without dealing with those kind of long and deep searches?

* I'm looking for a solution that I can implement in a job or a script (JCL, REXX, SYNCSORT, etc)



Thanks a lot,

Al.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2012
Location: USA

PostPosted: Mon Jan 24, 2022 10:55 pm
Reply with quote

You definitely cannot do it using JCL. No way.

Depending on your more detailed requirements, there are two most affordable, and quite simple solutions:

1) write a REXX script for almost any sophisticated search criteria.

2) for relatively simple search criteria, you can use some combination of system utilities used sequentially, several of this list:
- SUPERC
- IEBPTPCH
- IEBGENER
- FILEAID
- FILEMAN
- SYNCSORT/DFSORT (including SYNCTOOL/ICETOOL)
From my experience that list covered 90-95% of all required searches throughout libraries, and datasets; for the rest 5-10% REXX was more than enough.

P.S.
When you use either REXX script, or system utilities to perform your task, you often call many of them from a batch JCL, but this doesn't mean the problem is solved by JCL icon_biggrin.gif

My approach always was: not doing any task more complicated than it really is.
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Tue Jan 25, 2022 2:45 am
Reply with quote

Use the squeak system.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Tue Jan 25, 2022 12:03 pm
Reply with quote

All methods referred to by @sergeyken are valid choices. You do not need to have all Utilities installed, the basic ones work very well.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Tue Jan 25, 2022 4:26 pm
Reply with quote

PDSMAN's PDSM18 can also scan PDS members for specified strings, and optionally replace them. You can concatenate the PDS's to be searched on the input DD as well.

The problem with sys-symbols is they could be referenced on a JCL SET statement that assigns the value to a different name that is used within a proc or other bit of JCL.
Back to top
View user's profile Send private message
Lynne

New User


Joined: 15 Jan 2015
Posts: 93
Location: USA

PostPosted: Thu Jan 27, 2022 7:00 am
Reply with quote

you can run the ISPF search in batch. I do it all the time to search all members of my specified datasets. You do have to specify what datasets you want to search.

It is explained in the ISPF User Guide II -do a find on SRCHFOR or SRCHFORC

here is an explanation with some jcl:
ruifeio.com/2017/07/11/using-superc-to-search-for-text-strings/
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2012
Location: USA

PostPosted: Thu Jan 27, 2022 7:05 am
Reply with quote

Lynne Schuler wrote:
you can run the ISPF search in batch. I do it all the time to search all members of my specified datasets. You do have to specify what datasets you want to search.

It is explained in the ISPF User Guide II -do a find on SRCHFOR or SRCHFORC

here is an explanation with some jcl:
ruifeio.com/2017/07/11/using-superc-to-search-for-text-strings/

Yes, in ordinary parlance it is called SUPERC utility.
Back to top
View user's profile Send private message
Lynne

New User


Joined: 15 Jan 2015
Posts: 93
Location: USA

PostPosted: Mon Jan 31, 2022 4:32 am
Reply with quote

true. but examples always help.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1231
Location: Bamberg, Germany

PostPosted: Mon Jan 31, 2022 5:01 am
Reply with quote

Lynne Schuler wrote:
but examples always help.

Nope, only good ones do.
Back to top
View user's profile Send private message
Lynne

New User


Joined: 15 Jan 2015
Posts: 93
Location: USA

PostPosted: Mon Jan 31, 2022 5:17 am
Reply with quote

Joerg.Findeisen wrote:
Lynne Schuler wrote:
but examples always help.

Nope, only good ones do.


you get up on the wrong side of the bed or something?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts Duplicate several members of/in one l... JCL & VSAM 7
No new posts JCL Dynamic System Symbols JCL & VSAM 3
No new posts calling a JCl inside a JCL JCL & VSAM 3
Search our Forums:

Back to Top