Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does COBOL (MicroFocus) have a 'lint' feature?

Status
Not open for further replies.

butler

MIS
Oct 12, 1998
88
US
Hello everyone,

I am charged with writing COBOL programs for a distribution application using a Microfocus compiler. I have set up several COPY libraries containing working storage and procedures for database access. Rather than make a hundred small copy libraries for the tables I need to access, I would like to make a few big ones.

So...I am wondering if the Microfocus compiler/linker is smart enough not to allocate working storage for variables that are declared but not used in a program?

And...will procedures that are never performed be excluded from the build?

Any help would be greatly appreciated,
bill
 
Hi,

You are talking about the smartness of an optimizing compiler and I don't expect MicroFocus to be that smart.

Better put the source on comment bij putting a '*' in column 7 and perhaps mark also with something like a '~' in column 73 so that you kan use an editor like SPF/SE from Command Technology Corporation to modify only these special lines.

If you use the CBL format, you subtract 6 from these columns.

 
Thanks Crox,

I'm not exactly sure what your are trying to do with the SPF/SE editor. Could you please elaborate?

bill
 
With the SPF/SE editor you can easily change selected lines.

for example: you set a label in the margin of the first line which is to be on comment. You can name it .F
After that you mark the last line of the block with .L
Afther that you give the primary command:

change .f .l p'=' '*' 7 all

which changes any character in column 7 into a '*' between the labels .f and .l.

That is why I mentioned it; this editor is extremely valuable when you have to do such kinds of edits. It is also available on the mainfram from IBM for years. The PC version is more user friendly.
 
I forget to explain the use of the special marker in the edit.

If you have a token like '~' in column 73, you can say to the editor:

x '~' all 73

which means that all the lines which have this '~' on column 73 will be excluded: you don't see them in the edit session.

c p'=' ' ' 7 all x

which means that only the excluded lines are changed on column 7 for any character into space.

The x is an abbreviaton of eXclude and the c is an abbreviation of Change.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top