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 different rules for performing sort operation?

963


What is the difference between goback, stop run and exit program in cobol?

1232


What is rmode(24)

902


In COBOL, what is the different between index and subscript?

949


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

1077


Can we redefine the field of x(200) to less than 200?

1099


what is s000 u4087 error? please give the all error codes in cobol,jcl.

17516


How do you define a variable of comp-1 and comp-2?

914


2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic

2362


What are the different rules to perform a Search?

817


What are all the divisions of a COBOL program?

895


Which mode is used to operate the sequential file?

928


What are various search techniques in cobol? Explain.

871


Define static linking and dynamic linking.

872


Whats the difference between search & search ALL?

5885