Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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?

Answers were Sorted based on User's Feedback



Program A calls program B. Will the working storage variables declared in program B be initialized..

Answer / vinod babu bachina

when PROGA made a call to PROGB, if it is first time then
the execution in PROGB start from workign storage
section.suppose progA calls again PROGB then the execution
will start from procedure division only .So when we made a
second call to anu subprogram we have to intialize the
working storage section variables.otherwise second call
retains the values of first call.

Is This Answer Correct ?    22 Yes 2 No

Program A calls program B. Will the working storage variables declared in program B be initialized..

Answer / rajagopalan

The variables in the working-storage section of prog-b will
be initialized only if prog-a has given a CANCEL statement
after CALL statement. Othrwise the WS variables of prog-B
will retain the latest contents of the previous call.

Is This Answer Correct ?    13 Yes 1 No

Program A calls program B. Will the working storage variables declared in program B be initialized..

Answer / 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

Program A calls program B. Will the working storage variables declared in program B be initialized..

Answer / vivek

Rajagopalan's answer is the correct one.

Refer the IBM documentation.

http://publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.
jsp?topic=/com.ibm.entcobol.doc_3.4/tpsub04.htm

Is This Answer Correct ?    5 Yes 1 No

Program A calls program B. Will the working storage variables declared in program B be initialized..

Answer / nagesh

Well, it depends on the type of call u r making, if it's
dynamic call working storage variable will be initialized
every time automatically.
But if it's static call u can use either 'cancel' or
'is initial' .

Is This Answer Correct ?    7 Yes 4 No

Program A calls program B. Will the working storage variables declared in program B be initialized..

Answer / ab

I think Nagesh's answer is correct.

Is This Answer Correct ?    1 Yes 2 No

Program A calls program B. Will the working storage variables declared in program B be initialized..

Answer / ramanujam

Everything will be cleared in Program B.
once it returns

Is This Answer Correct ?    1 Yes 15 No

Post New Answer

More COBOL Interview Questions

what is the use of filler in cobol programing?

4 Answers   MAT,


How can you pass values from COBOL program to non-COBOL programs?

2 Answers  


How do u sort the table for Search ALL? Is it only using ASCENDING KEY IS statement in occurs clause? If the data is input in non ascending order, will the ASC KEY IS automatically sort the data? or will it throw compile time error?

1 Answers   CTS,


what are the paramater we cannot use in procedure?how many instream we can write in single jcl?can we call instream to catalog and ctalog to instream?

2 Answers   Satyam,


Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

0 Answers  


Have you code any new programs in COBOL ? What is the functionality of the programs?

2 Answers   Patni, Xansa,


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

0 Answers   Accenture,


What will happen if we generate GDG +2 version instead of +1 version?

2 Answers   T systems,


)what is retrieve?

1 Answers   IBM,


How do you define a table/array in COBOL?

5 Answers   Hexaware,


9(2).99 how many bytes take? Why . consider as a byte?

2 Answers  


soc-7 is a bad data,invalid data. when ever we are moving the alphabets in the position of numeric then we got this abend. so my question is if o1 ws-data pic 9(1) value passing the alphabet some x. then we got soc-7 or not? i want clarification ?

7 Answers   CitiGroup, IBM,


Categories