Rexx exec to find and delete the unused variables in cobol



IBM's Command List programming language & Restructured Extended Executor

Rexx exec to find and delete the unused variables in cobol

Postby lamrincool » Fri Nov 04, 2011 12:20 am

Hi,

I am working on creating the rexx exec to find and delete the unused variables in cobol program. If anyone might have a similar utility please share.
lamrincool
 
Posts: 2
Joined: Fri Nov 04, 2011 12:12 am
Has thanked: 0 time
Been thanked: 0 time

Re: Rexx script to find and delete the unused variables in c

Postby enrico-sorichetti » Fri Nov 04, 2011 12:33 am

You asked for it ....
what a useless waste of resources :geek:

chances of getting help on futilities is pretty slim,
what is the business case about it.
or in plain words, what does Your organization plan to gain out of it
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Rexx script to find and delete the unused variables in c

Postby dick scherrer » Fri Nov 04, 2011 1:07 am

Hello and welcome to the forum,

If any one have the same rexx script please share or guide me to achive this rexx script.
I have not yet seen one that will work 100% of the time. If someone builds one, it will probably not be provided for free. Keep in mind that just because a variable name is not found in the code, does NOT mean it is not used. . . There are considerations about things that are in copy members, include members and the like that this "parser" will not know about. . .

Who in your organization is willing to spend the $ for this to be developed?

Suggest the time would be much better spent on other efforts.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Rexx script to find and delete the unused variables in c

Postby BillyBoyo » Fri Nov 04, 2011 1:32 am

Plus, the Cobol compiler already does it, with OPTIMISE(FULL).
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Rexx exec to find and delete the unused variables in cob

Postby lamrincool » Sat Nov 05, 2011 8:09 pm

Thankyou for your responses.

Yes, your are right dick scherrer. Why we are devloping this rexx script is to find unused variables in cobol programs. These cobol programs are devloped in 90's which has many temporary variables delcared and not used in program and those codes are in production now.

As part of removing those temporary variables from cobol program which is in production we are devloping this rexx script.

BillyBoyo,

We are using SCLM for compling source code. Please let me know how we can OPTIMISE(FULL) option in SCLM.

Thanks.
lamrincool
 
Posts: 2
Joined: Fri Nov 04, 2011 12:12 am
Has thanked: 0 time
Been thanked: 0 time

Re: Rexx exec to find and delete the unused variables in cob

Postby enrico-sorichetti » Sat Nov 05, 2011 8:15 pm

Please let me know how we can OPTIMISE(FULL) option in SCLM.

talk to the people who customized the SCLM setup!
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Rexx exec to find and delete the unused variables in cob

Postby BillyBoyo » Sat Nov 05, 2011 8:24 pm

For setting the compiler options for SCLM, talk to your site support.

They can be set by putting something as simple as "CBL option(parameter)" into your source, anywhere before the Prodcedure Division (best to put it way up front). Your ability to do this can be turned off at installation time. You want to use this for a specific task, so talk to your support as to how best to do it.

The compiler will obviously not do anything to your source files, but will indicate on the DMAP storage definitions which are not used and those definitions will not be included in the object module produced by the compiler.

If you want to rexx anything, you could consider how to extract the information from the listing to show (or even do) what needs to be done to the source module.

Read up on the OPT(FULL) in the manual, it points out that there might be "unused" storage which is there for a reason, and how to get around it.

I'd find it unlikely that the unused storage is causing any sort of a problem to your existing system, but I suppose you can get some good experience from the exercise. Let us know how it goes.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post