Page 1 of 1

Rexx exec to find and delete the unused variables in cobol

PostPosted: Fri Nov 04, 2011 12:20 am
by lamrincool
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.

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

PostPosted: Fri Nov 04, 2011 12:33 am
by enrico-sorichetti
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

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

PostPosted: Fri Nov 04, 2011 1:07 am
by dick scherrer
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.

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

PostPosted: Fri Nov 04, 2011 1:32 am
by BillyBoyo
Plus, the Cobol compiler already does it, with OPTIMISE(FULL).

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

PostPosted: Sat Nov 05, 2011 8:09 pm
by lamrincool
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.

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

PostPosted: Sat Nov 05, 2011 8:15 pm
by enrico-sorichetti
Please let me know how we can OPTIMISE(FULL) option in SCLM.

talk to the people who customized the SCLM setup!

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

PostPosted: Sat Nov 05, 2011 8:24 pm
by BillyBoyo
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.