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

Write some characteristics of cobol as means of business language.

614


What are the different data types in cobol?

786


) How do u handle errors in BMS macro?

1423


how do you reference the printer file formats from cobol programs

652


What is comp-1 and comp-2?

756






I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

1798


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

670


How to remove 2 duplicate records and copy only one using job control language?

736


) what is the difference between AID and HANDLE AID?

1630


Define cobol?

856


What is inspect in cobol ?

797


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

1520


Write a cobol program making use of the redefine clause.

725


Difference between cobol and cobol-ii?

704


how do you reference the rrds file formats from cobol programs

792