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

How to list unreferenced data items


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Daniel Biagi

New User


Joined: 15 Oct 2007
Posts: 4
Location: Brazil

PostPosted: Mon Nov 05, 2007 4:54 pm
Reply with quote

Hello everybody,

I need to list all unreferenced data items from a program using TSO. I know there's a feature in MFE that does this, but I only have remote access to the code.


Can anybody help me?



Thanks
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Nov 05, 2007 10:43 pm
Reply with quote

Hello Daniel and welcome to the forums,

I am not aware of any way to do this in standard tso/ispf.

You might be able to download the code and do what you want in MFE. . . If the source is in one or more PDS(s), you can download all members of a pds with a single click in many of the tcp/ip client software.

Just a thought.
Back to top
View user's profile Send private message
Daniel Biagi

New User


Joined: 15 Oct 2007
Posts: 4
Location: Brazil

PostPosted: Mon Nov 05, 2007 11:18 pm
Reply with quote

Thanks for the answer, Dick.

But the problem is that I don't have direct access to TSO/ISPF.
I need to make a remote connection to a computer inside the network and use the network to acess TSO/ISPF.

So I still need help icon_neutral.gif


Thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Nov 05, 2007 11:23 pm
Reply with quote

Quote:
But the problem is that I don't have direct access to TSO/ISPF.


What do You mean...
can You access the mainframes where the programs You need to check reside ???

Your description of Your access capabilities is not very clear
Back to top
View user's profile Send private message
socker_dad

Active User


Joined: 05 Dec 2006
Posts: 177
Location: Seattle, WA

PostPosted: Mon Nov 05, 2007 11:23 pm
Reply with quote

You have access to TSO/ISPF as I understand your statement. When a program is compiled, there is usually a name cross-reference section towards the end of the listing (unless some dunny has turned off that compile option....).

Every name is listed alphabetically along with every line where it is referenced.
Back to top
View user's profile Send private message
Daniel Biagi

New User


Joined: 15 Oct 2007
Posts: 4
Location: Brazil

PostPosted: Mon Nov 05, 2007 11:38 pm
Reply with quote

enrico-sorichetti wrote:

What do You mean...
can You access the mainframes where the programs You need to check reside ???

Your description of Your access capabilities is not very clear


I meant that I have to access a desktop inside the network (remote connection) where TSO/ISPF runs. In other words, I don't have privilege to do anything except open TSO/ISPF using IBM Host on Demand.

I cannot download/upload anything. Even clipboard sharing is disabled due security restrictions.

socker_dad wrote:
You have access to TSO/ISPF as I understand your statement. When a program is compiled, there is usually a name cross-reference section towards the end of the listing (unless some dunny has turned off that compile option....).

Every name is listed alphabetically along with every line where it is referenced.


Yes. I know I can see all the referenced data there, but sometimes I have to remove unreferenced data from a program, like unused variables in Working-Storage.

So if there was a way, to list them for me, just like MFE does, it would be pretty helpful.

Just an example of what I need.


Code:
WORKING-STORAGE SECTION.
01 WDATE              PIC X(06) VALUE SPACES.
01 WTIME               PIC X(08) VALUE SPACES.

PROCEDURE DIVISION.
RT-PRINCIPAL       SECTION.
*
ACCEPT WTIME FROM TIME.
*
RT-PRINCIPALX.   EXIT.


The WDATE data-item isn't being used in the program so it isn't referenced. It should be in the list. But I don't have any clue of how can this be done.



Thanks for the answers, people!
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Nov 06, 2007 12:36 am
Reply with quote

Do you have access to (or can you generate) the compile listings?
An XREF gives a sorted list of all datanames (the short version omits the unreferenced ones) and the line number defined and where modified.
Pair a sorted by defined line number version up to the data division map (showing actual order and level) and that will get you the raw data....
In the 'olden' days, you could still get an unsorted XREF, but it doesn't seem to be available anymore......
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Nov 06, 2007 1:24 am
Reply with quote

by using the correct compile options (you have internet access, take a look at a manual to determine the correct compiler options) you can generate your lists and not generate an object.

If you have access to delete unused data definitions in a program, you have access to accomplish what you want.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Nov 06, 2007 2:44 am
Reply with quote

Hello Daniel,

Can you download sysout output from jobs you submit on the mianframe?

If you can, you might simply list the source into a single output file and download the "listing" or run multiple and download each output individually.

Just a thought. I've worked quite a few places that had much of the environment "locked down" but often there is a way to get what you need and still stay within "the rules" of the organization.
Back to top
View user's profile Send private message
Daniel Biagi

New User


Joined: 15 Oct 2007
Posts: 4
Location: Brazil

PostPosted: Tue Nov 06, 2007 5:10 pm
Reply with quote

Thanks again for the answers.


I'll try to compile the program using NOUNREF and will keep you updated about it.

@dick scherrer,

Check you PM, please.



Thanks
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 Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top