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

COBOL Copy Statement


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts VB to VB copy - Full length reached SYNCSORT 8
Search our Forums:

Back to Top