What is local storage section in COBOL ?

Questions by dtiwar

Showing Answers 1 - 15 of 15 Answers

Govind

  • Sep 27th, 2011
 

working-storage section.

divya

  • Dec 12th, 2011
 

It is the Working storage.

  Was this answer useful?  Yes

Jimmy

  • Jan 6th, 2013
 

LOCAL-STORAGE is NOT the same as WORKING-STORAGE. Check the Manual, there are some key differences.

  Was this answer useful?  Yes

Toleshwar

  • Mar 14th, 2013
 

Local storage section is a section of Data Division of Cobol which is similar to the Working storage section. The only difference being that the variables in the Local Storage always get initialised when the program is initiated. This is mostly used in called subroutines, where defining variables in LS section saves the efforts of initilising all the fields again in the procedure division.

Just to add, my two cents:

Data items in the LOCAL-STORAGE SECTION are automatically allocated for each instance of a program invocation. When a program runs in multiple threads simultaneously, each invocation has a separate copy of LOCAL-STORAGE data.
Data items in the WORKING-STORAGE SECTION are allocated once for each program and are thus available in their last-used state to all invocations of the program.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions