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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the cobol coding sheets?

664


What is the usage of comp fields in cobol?

658


if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.

5680


What is static and dynamic call in cobol?

593


What is rmode(any) ?

686






Write the code to count the sum of n natural numbers.

699


i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?

894


What are the rules of the move verb?

704


Name the divisions, which are available in a cobol program?

685


What is link edit in cobol?

772


What is the local-storage section?

681


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

661


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

823


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

672


What is difference between static and dynamic call in cobol?

777