Page 1 of 1

Check the syntax of a COBOL program.

Posted: Sun Sep 20, 2015 8:29 pm
by Kishor Bag
Hi,

Is there any way to check the syntax of a COBOL program with out compiling it actually. Like we have JCL SCAN.

Re: Check the syntax of a COBOL program.

Posted: Sun Sep 20, 2015 8:41 pm
by zprogrammer
Please explain what are you trying to achieve here and based on your explanation you will get better suggestion or even solutions

Re: Check the syntax of a COBOL program.

Posted: Mon Sep 21, 2015 12:02 am
by nicc
There may be syntax checkers out there - did you Google?
But why not:
Put a deliberate error in your program so that it will not go beyond the compile stage then ignore messages for that error.

Re: Check the syntax of a COBOL program.

Posted: Mon Sep 21, 2015 4:22 am
by William Collins
Given that a COBOL program is likely many hundreds of lines, possible a few thousand, and even tens of thousands, and given that COBOL syntax is a couple of orders of magnitude more complex than JCL, and given that "JCL Checkers" never seem to be up-to-date with what they think that they can deal with, this isn't really something that you want to do. To tie up your "terminal" for several minutes or more is not a good idea.

Standard ISPF has an option to do "foreground" compiles. The fact that you can't see that tells you that your site does not want you doing anything like that.

If you look in the Enterprise COBOL Programming Guide you will find out how to do a syntax-check-only of a COBOL program if you study the compiler options. Indeed, there are many things you can turn off in the compiler if you just want a quick syntax check.