Program A calls program B. Will the working storage
variables declared in program B be initialized every time
it is called by program A or will the values be retained
until the end of program A?

Answer Posted / s.rajagopalan

none of the above answer is correct.
In static call the working storage varibales is not
initialised when the sub program is called. It retains the
latest values of ws variables in the subrpogram.

In case of dynamic call if you use "cancel" stament then
the ws variables of the sub program are initialised.
if you dont use cancel statement and call the subprogram
then the latest values are retained for the WS vriables.

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

693


i want a program using by if, evaluate , string, unstring, perform, occurs?

4037


Explain how to differentiate call by context by comparing it to other calls?

679


What are the different data types in cobol?

781


here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?

6794






What is the utilization of copybook in cobol?

648


IF I mention stop run in CICS what happens?

1886


How you can characterize tables in cobol?

708


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

1919


What is the difference between PIC 9.99 and PIC9v99?

769


Discuss about changing dataset name in proc.

757


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

3706


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

2654


Write some characteristics of cobol as means of business language.

611


Explain what you understand by passing by value.

685