COBOL quality check on mainframes, any tool?
COBOL quality check on mainframes, any tool?
Hi,
I amwondering if there are any tools which can verify a COBOL source for indentation mistakes? For example on conditional constructs like IF THEN ELSE construst. Or verify COBOL source for code duplication ...
I amwondering if there are any tools which can verify a COBOL source for indentation mistakes? For example on conditional constructs like IF THEN ELSE construst. Or verify COBOL source for code duplication ...
Re: COBOL quality check on mainframes, any tool?
indentation is not a COBOL Language thing - it is the programmer's thing. As such it can vary from person to person and project to project and workplace to workplace. If you need something to enforce this in your place then you a) need to set the standard, b) update old code to meet the standard c) write something to report on standard adherence (your "tool") and d) provide a mechanism (including disciplinary action) to ensure the standard is adhered to.
Regards
Nic
Nic
- Anuj Dhawan
- Founder
- Posts: 2824
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: COBOL quality check on mainframes, any tool?
I've not tried it and it's been a while when I used it but have you tried the OPTIMIZE option, which states the following:
Use OPTIMIZE to reduce the run time of your object program; optimization might also reduce the amount of storage your object program uses. Because OPTIMIZE increases compile time, and can change the order of statements in your program, you should not use it when debugging.
If OPTIMIZE is specified without any suboptions, OPTIMIZE(STD) will be in effect.
The FULL suboption requests that, in addition to the optimizations performed under OPT(STD), the compiler discard unreferenced data items from the DATA DIVISION and suppress generation of code to initialize these data items to their VALUE clauses. When OPT(FULL)is in effect, all unreferenced 77-level items and elementary 01-level items will be discarded. In addition, 01-level group items will be discarded, if none of the subordinate items are referenced. The deleted items are shown in the listing. If the MAP option is in effect, a BL number of XXXX in the data map information indicates that the data item was discarded.
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
-
- Global Moderator
- Posts: 490
- Joined: Sun Aug 25, 2013 7:24 pm
- Anuj Dhawan
- Founder
- Posts: 2824
- Joined: Sun Apr 21, 2013 7:40 pm
- Location: Mumbai, India
- Contact:
Re: COBOL quality check on mainframes, any tool?
I went by the subject line and thought it's more to do with optimizing the code for better quality. I should have considered the content ...
Perhaps it'll benefit OP if he search on "Formatter for COBOL or Beautifier for COBOL", it'll lead to you some products for the very purpose.
Perhaps it'll benefit OP if he search on "Formatter for COBOL or Beautifier for COBOL", it'll lead to you some products for the very purpose.
Thanks,
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anuj
Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Re: COBOL quality check on mainframes, any tool?
Thanks. I have searched online on Beautifier for COBOL and found some links. But all searches suggest for a product to be purchased... can nothing be done in REXX or in the COBOL editor itself?
Re: COBOL quality check on mainframes, any tool?
Yes - you can write a program in the language of your choice, e.g. Rexx, to do so. Which COBOL editor do you mean? I am not actially aware of an editor specific to COBOL but, presumably, any editor has commands to help you align the data. Certainly ISPF has.
Regards
Nic
Nic
Re: COBOL quality check on mainframes, any tool?
Yes I mean ISPF editor. But we manually align in ISPF or have I missed some functionality of it?
- enrico-sorichetti
- Global Moderator
- Posts: 843
- Joined: Wed Sep 11, 2013 3:57 pm
Re: COBOL quality check on mainframes, any tool?
any editor has commands to help you align the data. Certainly ISPF has.
what Nic meant was that ISPF provides basic commands for formattingBut we manually align in ISPF or have I missed some functionality of it?
Code: Select all
(( )) << >> ( ) < >
the suggestion was to to write Your own formatting/normalizing tools
naturally Your organisation has to make the proper cost/quality analysis
( develop VS. buy )
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
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

Re: COBOL quality check on mainframes, any tool?
Also, ISPF will autoident the cursor on newly inserted lines according to the rules as specified in the help.
Regards
Nic
Nic
Re: COBOL quality check on mainframes, any tool?
Thanks for all the replies.
So basically a programmer has to it all manually and no such automated tool is available.
So basically a programmer has to it all manually and no such automated tool is available.
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: COBOL quality check on mainframes, any tool?
I use the source indentation as a quality check on the programmer(s) that wrote the code. If the indentation is sloppy (some 4, some 3, some 9 columns for example) then I expect the code to be sloppy as well and check it MUCH more closely than I otherwise would.
Re: COBOL quality check on mainframes, any tool?
Can such things be taken care in modern ways of COBOL code writing like RDz or OpenCOBOL?Robert Sample wrote:I use the source indentation as a quality check on the programmer(s) that wrote the code. If the indentation is sloppy (some 4, some 3, some 9 columns for example) then I expect the code to be sloppy as well and check it MUCH more closely than I otherwise would.
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: COBOL quality check on mainframes, any tool?
I'm not sure what you mean -- OpenCOBOL (which is the OLD name for GnuCOBOL) is merely a COBOL compiler and does not, in and of itself, enforce any standards for indentation nor quality. RDz is a COBOL development environment that includes quality analysis tools -- as long as you agree with what IBM calls "quality" then it could be a way to do quality checks. And I haven't used RDz so I'm not sure if it supports indentation standards or not.Can such things be taken care in modern ways of COBOL code writing like RDz or OpenCOBOL?
Quality in code is a very broad topic, anyway -- programming styles differ and hence what one person writes in 2000 lines of COBOL may take someone else 3000 lines of COBOL. Yet both programs produce the same result on the same input data, and the 3000-line program is structured such that it is easy to maintain while the 2000-line program has GOTO statements everywhere. Which program is higher quality? Would your answer change if the 2000-line program requires 1 second of CPU time per 1000 records while the 3000-line program requires 10 seconds of CPU per 1000 records?
Re: COBOL quality check on mainframes, any tool?
That's why I ask this question. COBOL is out there since so long but we don't have a such a quality control easily available to us?Quality in code is a very broad topic, anyway -- programming styles differ and hence what one person writes in 2000 lines of COBOL may take someone else 3000 lines of COBOL. Yet both programs produce the same result on the same input data, and the 3000-line program is structured such that it is easy to maintain while the 2000-line program has GOTO statements everywhere. Which program is higher quality? Would your answer change if the 2000-line program requires 1 second of CPU time per 1000 records while the 3000-line program requires 10 seconds of CPU per 1000 records?
- Robert Sample
- Global Moderator
- Posts: 1903
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: COBOL quality check on mainframes, any tool?
By now you should understand that the answer is no, partly because code quality is a really fuzzy term. It means different things to different people.
- enrico-sorichetti
- Global Moderator
- Posts: 843
- Joined: Wed Sep 11, 2013 3:57 pm
Re: COBOL quality check on mainframes, any tool?
that' s the reason i locked the topic ...
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
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
