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
What is the difference between next sentence and continue in cobol programing language?
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.
i need a small 3d program using inline and outline.
What rules are to be followed while using the corresponding options?
What are the various section in data division and briefly explain them.
When is inspect verb is used in cobol?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
What is a SSRANGE and NOSSRANGE?
Can we redefine the field of x(200) to less than 200?
Name the sections present in data division.
Can we change the password using ALTER? anyone tried and changed?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
Why is it necessary that file needs to be opened in I-O mode for REWRITE?
What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?
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.