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
 

 

COBOL Copy Statement

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

New User


Joined: 29 Sep 2004
Posts: 35
Location: bangalore

PostPosted: Wed Nov 03, 2004 8:58 pm    Post subject: COBOL Copy Statement
Reply with quote

I'm writing some code that will be copied into Cobol programs:

COPY DIAG001.

Within the code that's copied (into many different programs), how can I find
out the name of the program that this code has been copied into? I've
looked at the Cobol Special Registers, and at all the Cobol Functions that I
could find, but don't see any reference to the name that is the operand of
the PROGRAM-ID statement.
Back to top
View user's profile Send private message

mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Nov 03, 2004 10:22 pm    Post subject:
Reply with quote

Hi Chandra,

You don't mention where or when or why you want to do this.

You can use ISPF's SEARCH FOR feature (3.13 or 1.14?) against your source lib. Search for "DIAG001". This will return all uses of "COPY DIAG001" (and maybe some other uses of it) along with the member name of the using program.

You can edit the Searcg for listing to extract only copy symts and module names.
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. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
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 COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 5 Thu Apr 27, 2017 1:15 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


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