Bulletin Board

What’s new at MAINFRAMES 360
(Updates June '10)...
- I am writing articles on CICS. The effort would be to make the material of certain standard, practical and easy to comprehend.
- JCL needs fresh look, and more weightage needs to assigned to conventions and practises adopted in Production Environments at most sites
- A note of appreciation : Thanks to all our followers, for making Mainframes360 a success!

Mainframes360 Search

Loading

Quick Links

Jump to :  

Saturday, August 15, 2009

WORKING-STORAGE SECTION, Rough-work areas in COBOL


Contents

  1. WORKING-STORAGE SECTION 
  2. Simple COBOL Program to declare and use WORKING STORAGE Areas 



Q. Could you throw some light on the WORKING-STORAGE SECTION of a COBOL Program?

The WORKING-STORAGE SECTION is used to declare any fields or records that are not going to be used in input files, or output files, but they are used to store the intermediate results of processing in a temporary storage area. WORKING STORAGE SECTION will always follow the FILE SECTION. Here too, we can describe the records in the same as we do in the FILE SECTION.
WORKING-STORAGE SECTION can contain group-items and elementary data-items also, just like the FILE SECTION Paragraph. An initial value may also be assigned to the data-items by using the VALUE Clause.

The storage for WORKING-STORAGE items is allocated, when you start running the COBOL Program.

Given below is a simple program that stores some data in Working Storage Variables, and then displays them on the Spool Output SYSOUT Dataset.


Upon running the above COBOL Program, we get the following output in the SYSOUT Dataset.

0 comments:

Post a Comment

Related Posts with Thumbnails

Quick Links

Jump to :  

Note :

© Copyright – Quasar Chunawalla, 2010.
Note : The copyrights of all the material, text and pictures posted in this website belong to the author. Any instance of lifting the material from this website, shall be considered as an act of plagiarism. For any clarifications, please mail at quasar.chunawalla@gmail.com
 
back to top