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

PROC to JCL mapping


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

New User


Joined: 16 Aug 2011
Posts: 3
Location: India

PostPosted: Tue Dec 08, 2015 12:37 pm
Reply with quote

Hi Guys,

I am trying to map the procedures in the procedure library to the corresponding JCLs from which they are executed. I have a lot of procedures. Can you suggest me how can I find for each procedure the corresponding JCLs from where the Procedure is being called.

Thanks
Sam
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Dec 08, 2015 12:39 pm
Reply with quote

Scan your JCL libraries.
Back to top
View user's profile Send private message
jena_samirkumar

New User


Joined: 16 Aug 2011
Posts: 3
Location: India

PostPosted: Tue Dec 08, 2015 12:41 pm
Reply with quote

I don't want to do it manually as I have a lot of procs.I want some JCL or any other idea to do it automatically.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Dec 08, 2015 1:30 pm
Reply with quote

Quote:
I don't want to do it manually as I have a lot of procs.I want some JCL or any other idea to do it automatically.


Search the forum, as far as I know there will be examples here.
Back to top
View user's profile Send private message
Abid Hasan

New User


Joined: 25 Mar 2013
Posts: 88
Location: India

PostPosted: Tue Dec 08, 2015 1:45 pm
Reply with quote

In-line with what Peter has pointed out, the output of ISPF 3.15 (Search-ForE) can be something you might want to look at; that as input to a small REXX or DFSORT or any utility of your choice for reformatting data will give you what you're looking for.

Hth.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Dec 08, 2015 3:38 pm
Reply with quote

You could modify the sample given in DFSort Smart Tricks for deleting all members of a PDS.

Instead of generating DELETE statements, generate SRCHFOR statements and pass the results into a step which runs ISRSUPC against a concatenation of your JCL libraries.

Garry
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Wed Dec 09, 2015 12:38 am
Reply with quote

1.You can place all proc name one by one as a record in a PS file
2.Write a rexx to read this file and read one by one and search in JCL lib and find the member name and write to output
Google for 'read file and scan pds rexx' to get the source code

Or try it reverse way , get the JCL names and procs corresponds to it as done here.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Wed Dec 09, 2015 1:49 am
Reply with quote

No easy solution as far as I am aware, which is why there are commercial products out there, and even they are sometimes failing. One alternative which springs to mind is to read all your executed jobs while still in spool using the SDSF API and then scan for the appropriate messages (xxx expanded from...)
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Wed Dec 09, 2015 2:00 am
Reply with quote

Suggest my approach as quite easy. I adapted the sample mentioned in about 15 mins to meet the requirements, I believe. ISRSUPC step can take multiple JCLLIBS to scan. A tiny further effort to modify the first step is needed if multiple PROCLIBS are involved.

Garry.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Dec 09, 2015 12:09 pm
Reply with quote

Quote:
I adapted the sample mentioned


I hope you also included a test for "PROC=".
Back to top
View user's profile Send private message
jena_samirkumar

New User


Joined: 16 Aug 2011
Posts: 3
Location: India

PostPosted: Wed Dec 09, 2015 12:24 pm
Reply with quote

Hi Gary,
Is it possible to post the JCL to delete all member of PDS.I am not able to get a copyof the DFSORT smart trick pdf.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Dec 09, 2015 3:22 pm
Reply with quote

jena_samirkumar, till now your only input was can i get some JCL or code.

Maybe you start doing/trying something yourself?

Being a software engineer, ex IBM employee with JCL and REXX skills.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Wed Dec 09, 2015 7:44 pm
Reply with quote

The DFSort Smart Tricks is linked to in this and/or the sister forum in the DFsort section so saying you cannot get hold of same is saying that you have not tried.
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Wed Dec 09, 2015 8:25 pm
Reply with quote

Quote:
I hope you also included a test for "PROC=".


Yes, that's quite easy, too. Just generate both "EXEC procename" and "EXEC PROC=procname" control cards for each - a simple thing to do in DFSORT.

Since the Smart Tricks pdf is freely available, I'm surprised it can't be downloaded. I'm not prepared to just hand over a solution - helping correct a problem one is a different matter.

Garry.
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 Proc print in Mainframe All Other Mainframe Topics 4
No new posts trying to set return code in PROC JCL & VSAM 15
No new posts Execute DSNTEP2 in REXX which is call... CLIST & REXX 4
No new posts proc step return code to override in ... JCL & VSAM 3
No new posts Can we pass cobol pointer to cobol-db... DB2 4
Search our Forums:

Back to Top