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

how can i see junk values in dclgen or in hostvariable of comp ?

2635


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

847


i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

2204


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

768


write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc

875






1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

1716


What is report-item in COBOL?

796


What are the different open modes available in cobol?

822


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.

1047


Are you comfortable in cobol or jcl?

718


how to access the file from prodution from changeman tool and to submit a file to production

6887


Write down the divisions of cobol program?

750


can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

2069


how to move the records from file to array table. give with code example

2315


What is the default value(s) for an initialize and what keyword allows for an override of the default?

831