Can anyone explain me CALL procedure in COBOL.Does it
carries similarities like call by reference in C.



Can anyone explain me CALL procedure in COBOL.Does it carries similarities like call by reference ..

Answer / sravani

CALL statement is used to whenever if we want to call any subprograms in the main program.
The call can be a dynamic call or static call.
In static call the subprogram is compiled alone with the main program where as in dynamic call the calling program and called program will be compiled separately.
If there were any changes in the subprogram then main program also needs to be recompiled in case of static call its not required in dynamic call.
For static call NODYNAM is choosen and for dynamic call DYNAM is choosen. For static call the program name is passed directly for dynamic call the program name is declared in working storage section and it will be called using the working storage variable.
Various ways of calling the subprograms using call statement
CALL WS_PGM using by reference using identifier-1, identifier-2.
CALL WS-PGM using by content using identifier-1, identifier-2.
CALL WS-PGM using by value using identifier-1, identifier-2.
CALL WS-PGM.

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More COBOL Interview Questions

Can you call an OS VS COBOL pgm from a VS COBOL II pgm ?

3 Answers   Microsoft,


how do you reference the variable unblock file formats from cobol programs

0 Answers  


How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not using JCL)

9 Answers   Bank Of America,


Under which scenario you would go for a static call as opposed to dynamic call?

5 Answers   TCS,


How can i write a comp-3 variable into a sequential file should i declara the field in the file description as comp- 3?

1 Answers  






how to create temporary data set in jcl? what is the use?

3 Answers   Cap Gemini, Temenos,


how can u find out just by seeing wheater it is main program or sub program ? any two ways to identify reply soon ?

2 Answers  


What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?

7 Answers   T systems,


SIGN TRAILING SEPARATE field occupy ?

3 Answers  


how can we get current dat and time thru cobol pgm

3 Answers   DELL,


When is inspect verb is used in cobol?

0 Answers  


What is the difference between PIC 9.99 and 9v99?

7 Answers  


Categories