Hi Friends,
If we have a JCL library having hundreds of Jobs. Now I want to list all the PROCS which are being used in this library.
How can we do it??
Well I think Rexx should be best way to do it but not everyone knows it. Is there any other way??
Finding out PROC's from a JCL Lib
-
- Posts: 93
- Joined: Thu Mar 22, 2012 10:02 am
- Skillset: COBOL
CICS
JCL
DB2
VSAM
IMS - Referer: INTERNET
Finding out PROC's from a JCL Lib
-----------------------------------------
As long as you think you are a student, you are doing well.
The day you consider yourself as the master of the game..........well
As long as you think you are a student, you are doing well.
The day you consider yourself as the master of the game..........well
-
- Global moderator
- Posts: 3805
- Joined: Tue Jan 25, 2011 12:02 am
- Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
- Referer: Google
Re: Finding out PROC's from a JCL Lib
If you have access to anything which can search members in a PDS, you could use that.
Do you just want to "look" at the output or do something with it?
Do you just want to "look" at the output or do something with it?
-
- Posts: 93
- Joined: Thu Mar 22, 2012 10:02 am
- Skillset: COBOL
CICS
JCL
DB2
VSAM
IMS - Referer: INTERNET
Re: Finding out PROC's from a JCL Lib
Yes we have a search tool.
srchfor 'XXXX'
Here we can use like SRCHFOR ' PROC' and this would give me the number of occurence of PROC which means number of PROCs being used.
What I want is to make a repository of the PROC names.
srchfor 'XXXX'
Here we can use like SRCHFOR ' PROC' and this would give me the number of occurence of PROC which means number of PROCs being used.
What I want is to make a repository of the PROC names.
-----------------------------------------
As long as you think you are a student, you are doing well.
The day you consider yourself as the master of the game..........well
As long as you think you are a student, you are doing well.
The day you consider yourself as the master of the game..........well
-
- Global moderator
- Posts: 3006
- Joined: Fri Apr 18, 2008 11:25 pm
- Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
- Referer: www.ibmmainframes.com
Re: Finding out PROC's from a JCL Lib
in a library containg JCLs referring to PROCS
most probably searching for the word PROC will not return anything useful
I have seldom seen in JCL the construct EXEC PROC=<procname>
usually everybody writes EXEC <procname>
the most reasonable approach is to use SRCHFOR to search for the word EXEC
and process afterward the result wit SORT or REXX to extract the token that follows the EXEC word
and disambiguate between
EXEC PGM=
EXEC PROC=
EXEC <procname>
it is enough to ...
check for "//" in columns 1-2
scan/find the EXEC word
extract the token/word that follows
-- providing that the token could be " " terminated or "," terminated
reparse the token found for disambiguation
most probably searching for the word PROC will not return anything useful
I have seldom seen in JCL the construct EXEC PROC=<procname>
usually everybody writes EXEC <procname>
the most reasonable approach is to use SRCHFOR to search for the word EXEC
and process afterward the result wit SORT or REXX to extract the token that follows the EXEC word
and disambiguate between
EXEC PGM=
EXEC PROC=
EXEC <procname>
it is enough to ...
check for "//" in columns 1-2
scan/find the EXEC word
extract the token/word that follows
-- providing that the token could be " " terminated or "," terminated
reparse the token found for disambiguation
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
- Akatsukami
- Global moderator
- Posts: 1058
- Joined: Sat Oct 16, 2010 2:31 am
- Skillset: Rexx, JCL, DB2/SQL, TSO/ISPF, PL/I
- Referer: ibmmainframes
- Location: Bloomington, IL
- Contact:
Re: Finding out PROC's from a JCL Lib
I would also check that column 3 is not an asterisk (*). You might think that no one would be so stupid as to write JCL that would meet Dr. Sorichetti's criteria and not mine. You would be wrong.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
-
- Global moderator
- Posts: 3805
- Joined: Tue Jan 25, 2011 12:02 am
- Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
- Referer: Google
Re: Finding out PROC's from a JCL Lib
Also EXEC should be second token in line, not just "found" somewhere in the line.
Should find 1, 2 and 4 and ignore the rest, which are comments.
Code: Select all
// EXEC APROC
// EXEC PROC=APROC
//* EXEC APROC
//STEPN EXEC APROC
//THISDD DD DSN=A.DATA.SET,DISP=OLD Updated for EXEC APROC below
//A DD DSN=ANOTHER.DATA.SET,DISP=(OLD,DELETE) If EXEC above fails
Should find 1, 2 and 4 and ignore the rest, which are comments.
-
- Similar Topics
- Replies
- Views
- Last post
-
- 1
- 2577
-
by engh
View the latest post
Thu Jun 22, 2023 5:35 pm
-
-
Finding duplicate in variable lenght string in cobol
by kanipriya2785 » Fri Jun 17, 2022 10:02 pm » in IBM Cobol - 8
- 3408
-
by sergeyken
View the latest post
Wed Jun 22, 2022 3:10 am
-
-
-
Finding gaps in history table (slowly changing dimension 2)
by Ron Klop » Wed Jan 27, 2021 2:15 pm » in DB2 - 4
- 2233
-
by enrico-sorichetti
View the latest post
Fri Jan 29, 2021 1:35 am
-
-
- 4
- 5616
-
by NicC
View the latest post
Mon Oct 19, 2020 1:17 am
-
- 12
- 7845
-
by Misha786
View the latest post
Mon Nov 30, 2020 9:32 pm