Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

REXX program to search for copybooks

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
anamika roy

New User


Joined: 06 Sep 2007
Posts: 2
Location: India

PostPosted: Mon Sep 10, 2007 5:33 pm    Post subject: REXX program to search for copybooks
Reply with quote

Hi,

I have a requirement where using a REXX tool I need to find out the names of the copybook used in various COBOL programs. The COBOL programs are kept in a PDS. The format of the output should be like:

COPYBOOK name; Name of the COBOL program where the copybook is found.

Thanks,
Anamika
Back to top
View user's profile Send private message

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Sep 10, 2007 6:28 pm    Post subject:
Reply with quote

I would use an Edit-Macro: Exclude all comments line, then look for the word COPY. Make sure that it the COBOL statement and not part of a literal.

O.
Back to top
View user's profile Send private message
anamika roy

New User


Joined: 06 Sep 2007
Posts: 2
Location: India

PostPosted: Tue Sep 11, 2007 11:43 am    Post subject:
Reply with quote

This is the way we do. But in our case there are approximately 30 COBOL programs and for this we need to write a REXX program that will extract all the copybooks from the 30 COBOL programs. As this will save a lot of time.

Thanks,
Anamika
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Tue Sep 11, 2007 12:33 pm    Post subject: Reply to: REXX program to search for copybooks
Reply with quote

Quote:

But in our case there are approximately 30 COBOL programs and for this we
need to write a REXX program
that will extract all the copybooks from the 30 COBOL programs. As this will save a lot of time


1) First get the member list from the PDS into a stem variable 1 using the LISTDS and the OUTTRAP command.
2) Use the member name available in the the steam variable 1 to read the contents of the member into another stem variable (2).
The second stem variable will have the contents of the members. Then search for the word COPY and queue the line to get the copybook name. Also queue the member name to be displayed in the report. Put this in
a loop till the last member.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Sep 11, 2007 12:36 pm    Post subject:
Reply with quote

What I meant is that you should run this edit macro against each member. Doing this was widely dicussed in this forum.

O.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Tue Sep 11, 2007 12:54 pm    Post subject:
Reply with quote

I would do it in 2 steps:

  1. Use ISRSUPC to search for COPY (tip: use IDPFX,COBOL,DPCBCMT parameters)
  2. Code a Rexx program (or a Cobol program) to read the output of the previous step and write the copybook name and the program where it was found.

mmmmmm... ten minutes? ;)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us