COBOL Call by reference and Call by content

This is actually a tricky point in COBOL calling a sub module. The interesting point is while calling you pass some values into sub module. 

This can be done in two ways. One is sharing address to sub module.

Callabcdusing data-1.

Here you are just sharing address. So the values if any modified by sub module the called program can receive. The call by reference is default in COBOL.

In the second case you are passing values and the called progrm cannot receive back from sub module.

Callabcdby content using data-1.

This is called call by content. No sharing of values from called module to sub module.

The best example is passing Date to sub module. The called progrm does not need date value. This is just one way.

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.