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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Configuration section ..

Status
Not open for further replies.

naseems2000

Programmer
Jun 28, 2002
3
IN
Hi! Mates,
Needed help!!
Have a look at this piece of code:
018400 ENVIRONMENT DIVISION.
018500 CONFIGURATION SECTION.
018600*SOURCE-COMPUTER. IBM-3390 WITH DEBUGGING MODE.
018700 SOURCE-COMPUTER. IBM-3390.

‘With Debugging mode’ is option for COBOL pre-compiler. When this option is specified the COBOL source statements having ‘D’ in the 7th column gets compiled into the source code and thus are executed when program is run. When this mode is not specified all these statements will be treated as comments and hence won’t be compiled. This option is very useful for debugging.

Could anyone help explaining me the above explanation :)for ‘With Debugging mode’ ? I have noticed that in most of the codes it is usually commented..Then why do we code it?

Also This is seen in Batch Programs and not in Online? Could anyone tell me why?

Waiting in anticipation !!
Chao, naseem

 
This is old code,one of these that one's I learn it,you never use it.Regarding CICS-In CICS programs environmental division has nothing in it-this is a rule.
 
Naseem,
I've not used this option as my programs never need debugging ... hahahahahhaha.Sorry just drifted off the edge for a bit there.

Truthfully, I've not used this option. If it works as you say it does, then you would logically expect it to be commented out, as most of the code that we deal with is either live or expected to be bug free. You would only comment it back in (temporarily) in order to sort out a problem.
hth
Marc
 
Marc is right, the code is commented out for production, and the compiler will then ignore statements with "D" in column 7.
DO NOT USE IT. "with debugging mode" is obsolete in the next COBOL standard (due this year), and will be dropped from the standard after that.
There is a new feature, called "Conditional Compilation", which will enable different statements to be used at different times (it would include "debugging lines", but will be more flexible).

Stephen J Spiro
ANSI COBOL Standards Committee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top