Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to list unreferenced data items

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How to list unreferenced data items
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

Site Director


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

PostPosted: Mon Nov 05, 2007 10:43 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Mon Nov 05, 2007 11:23 pm    Post subject: Reply to: How to list unreferenced data items
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: 147
Location: Columbia, MO

PostPosted: Mon Nov 05, 2007 11:23 pm    Post subject: Reply to: How to list unreferenced data items
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    Post subject: Re: Reply to: How to list unreferenced data items
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: 3158
Location: Tucson AZ

PostPosted: Tue Nov 06, 2007 12:36 am    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Tue Nov 06, 2007 1:24 am    Post subject:
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

Site Director


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

PostPosted: Tue Nov 06, 2007 2:44 am    Post subject:
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    Post subject:
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    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
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Question related to Data dictionary f... rexx77 SYNCSORT 3 Thu Aug 31, 2017 7:23 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us